Log message #4192603

# At Username Text
# Jul 10th 2019, 08:09 inoas I ll share you the docker compose file
# Jul 10th 2019, 08:09 inoas I setup some docker compose thing to create nginx/mariadb/postgres/cli-php/etc
# Jul 10th 2019, 08:09 lorenzo Hehe yes
# Jul 10th 2019, 08:09 admad mostly people don't work on FB level scale
# Jul 10th 2019, 08:09 admad @lorenzo that falls under "very good justifications" :slightly_smiling_face:
# Jul 10th 2019, 08:08 inoas even on some clients machines for local testing
# Jul 10th 2019, 08:08 inoas I am using docker as well
# Jul 10th 2019, 08:08 lorenzo That was because having the entries codebase in you personal laptop was too much
# Jul 10th 2019, 08:08 inoas so for every filter I would nest them to create dupes of queries and then union them?
# Jul 10th 2019, 08:08 lorenzo I know that in 2013, when I visited Facebook, they did exactly that @admad
# Jul 10th 2019, 08:08 inoas lorenzo I got ton of associations going
# Jul 10th 2019, 08:07 admad i hope anyone using "dedicated VM on a server" has a very good justification for developing remotely :P
# Jul 10th 2019, 08:07 lorenzo currently using docker myself
# Jul 10th 2019, 08:04 charolastra what are you prefered development environments? local install, docker/vagrant, dedicated VM on a server?
# Jul 10th 2019, 08:03 lorenzo The two objects just need to answer on half of the question
# Jul 10th 2019, 08:03 lorenzo Just need two query objects, regardless of what they contain inside
# Jul 10th 2019, 08:03 inoas not sure how to do a union around an inner join in cakephp3 orm
# Jul 10th 2019, 08:02 inoas lorenzo what about notExists OR exists + condition
# Jul 10th 2019, 08:00 inoas hm no
# Jul 10th 2019, 07:58 inoas I have to wrap my head around it - let me see the query
# Jul 10th 2019, 07:58 inoas cause it seems to work but I want to separate filtering from selection/data return
# Jul 10th 2019, 07:58 inoas can I mimick the notMatching using just innerjoin
# Jul 10th 2019, 07:57 lorenzo If that does not work, I would suggest the simpler option: two query objects expressing the case where it matches and the case where there is no match, then use union()
# Jul 10th 2019, 07:56 lorenzo For example
# Jul 10th 2019, 07:56 inoas where(['NOT' => $conditions])
# Jul 10th 2019, 07:55 lorenzo if you negate the condition, I think you can use notMatching()
# Jul 10th 2019, 07:54 inoas (Tariffs=Products)
# Jul 10th 2019, 07:54 inoas $query->innerJoinWith('TariffsManufacturers.Manufacturers', function ($query) use ($conditions) {
# Jul 10th 2019, 07:53 inoas products m:n manufacturers obviously
# Jul 10th 2019, 07:53 inoas if I switch to leftJoinWith I will get the product even if there is no match
# Jul 10th 2019, 07:52 inoas at the moment I am using innerJoinWith + contain, which means if there is no relation I do not get a product
# Jul 10th 2019, 07:51 inoas Say I got a product and want to filter by its manufacturer - if the manufacturer matches: return the product, if there is no relation: return the product, if there is a relation but it does not match: do not return the product
# Jul 10th 2019, 07:50 lorenzo Or to keep
# Jul 10th 2019, 07:50 lorenzo if the record exists you want to filter out?
# Jul 10th 2019, 07:50 inoas let me fix that: I want to filter by associated records' field values if they exist
# Jul 10th 2019, 07:49 inoas so as a brief term: I want to filter by associated records IF they exist
# Jul 10th 2019, 07:48 lorenzo on mobile now
# Jul 10th 2019, 07:47 inoas jose_zap / lorenzo around by chance ;)?
# Jul 10th 2019, 07:47 inoas do I need to wrap the inneJoin in a subquery?
# Jul 10th 2019, 07:45 inoas should I use sub queries and use exists/notexists?
# Jul 10th 2019, 07:43 inoas LEFT JOIN seems to return records even if there is no match