Log message #4181380

# At Username Text
# Mar 29th 2019, 08:36 neon1024 Morning all
# Mar 29th 2019, 08:12 val @bmudda nice article although it does not answer the question how to switch schemas without creating a new database connection
# Mar 29th 2019, 00:37 rightscoreanalysis I have to do something in the befprePaginate event when using the CRUD plugin
# Mar 29th 2019, 00:33 bmudda you can change the `limit` to the number you need
# Mar 29th 2019, 00:33 bmudda ``` public $paginate = [ 'page' => 1, 'limit' => 10, 'maxLimit' => 100, 'sortWhitelist' => [ 'id', 'first_name', 'last_name', 'email' ], ];```
# Mar 29th 2019, 00:32 bmudda @rightscoreanalysis have you tried using the paginate property in your controller?
# Mar 28th 2019, 23:36 rightscoreanalysis atm I am getting the first 20 results only
# Mar 28th 2019, 23:36 rightscoreanalysis using the Friends of Cake CRUD plugin - does anyone know how I can get remove the limit of Crud.index
# Mar 28th 2019, 18:26 bango2 vs having to use where([ 'audio is' => $card->audio, ...]) in the case of NULL values
# Mar 28th 2019, 18:26 bango2 $dups = $this->Card->find('all')->where([ 'audio' => $card->audio, ...])->toArray();
# Mar 28th 2019, 18:24 bango2 I'm trying to find partial duplicates of an entity, called a Card. I'm trying to figure out how to query for fields that can be null. When I do it the regular way, the duplicate check fails if a field is null. If i use the SQL keyword "is", like "is null", then it works, but theres no guarantee that field will always be null so I want to avoid using IS
# Mar 28th 2019, 16:44 david yes, I did in that way. I have noticed that it breaks once I turn off debug. If I turn off and then on again, it's broken
# Mar 28th 2019, 16:43 david yes, I did
# Mar 28th 2019, 16:31 neon1024 @val Lol, I’m out!
# Mar 28th 2019, 16:30 neon1024 @birdy247 I don’t see why not. You could get the Validator instance from the Table class and run it’s methods I would think
# Mar 28th 2019, 16:18 val @neon1024 the use case is when each customer has its own database, the schemas are identical for each customer and cake app needs to retrieve data from multiple databases (from identical table of the customer database). Or simply to switch from once customer database to another. Creating new connections is too expensive.
# Mar 28th 2019, 16:11 birdy247 Can an entity be tested against a validator without patching
# Mar 28th 2019, 16:06 val too bad :(
# Mar 28th 2019, 16:00 neon1024 I would think that the schema is a direct map of your database, which will have a connection. So I’d say no, there isn’t. You’d have to create a new connection
# Mar 28th 2019, 16:00 ricksaccous but you can do it at run time
# Mar 28th 2019, 16:00 ricksaccous you still have to create a new connection
# Mar 28th 2019, 16:00 ricksaccous @val https://book.cakephp.org/3.0/en/orm/database-basics.html#creating-connections-at-runtime
# Mar 28th 2019, 15:56 val Hi, is there a quick way in cake 3.x to switch to a different database schema without creating a new database connection?
# Mar 28th 2019, 15:37 ricksaccous and conditional validation is not even that bad
# Mar 28th 2019, 15:37 ricksaccous the only advantage i get from this is not having to write conditional validation
# Mar 28th 2019, 15:31 ricksaccous hehe
# Mar 28th 2019, 15:31 josbeir the guy who invented that... oy
# Mar 28th 2019, 15:31 josbeir yeah, dont overthink something as lame as addresses
# Mar 28th 2019, 15:31 cnizzardini <- big fan of meta_data
# Mar 28th 2019, 15:31 ricksaccous whatever that's called
# Mar 28th 2019, 15:31 ricksaccous i mean not normalizing, making generic columns
# Mar 28th 2019, 15:31 ricksaccous this is an unessecary pain
# Mar 28th 2019, 15:31 josbeir still, if you use it as metadata you wouldn't need those fancy sql functions and mange that stuff by your app
# Mar 28th 2019, 15:31 ricksaccous honestly after doing it this way i think normalizing in one big table is the way to go
# Mar 28th 2019, 15:30 neon1024 ..amd query support too! :slightly_smiling_face:
# Mar 28th 2019, 15:30 josbeir mysql 5.7+ has decent json supprot :slightly_smiling_face:
# Mar 28th 2019, 15:30 neon1024 MySQL 5.7 :slightly_smiling_face:
# Mar 28th 2019, 15:30 cnizzardini not sure about maria/mysql
# Mar 28th 2019, 15:30 cnizzardini you can actually query on it there
# Mar 28th 2019, 15:30 cnizzardini i think PG has better support for json datatype
# Mar 28th 2019, 15:29 neon1024 Let me check