# |
Jul 10th 2019, 08:15 |
inoas |
lorenzo it looks like this https://gist.github.com/inoas/f8fa634ff3c8fee07df7775027c4d3f5 |
# |
Jul 10th 2019, 08:14 |
conehead |
Unfortunately docker volume mounts are incredibly slow on Windows machines. |
# |
Jul 10th 2019, 08:13 |
inoas |
lorenzo I am not entirely following the union thing |
# |
Jul 10th 2019, 08:12 |
admad |
charolastra: hehe |
# |
Jul 10th 2019, 08:12 |
admad |
i do have a db and file server for when things need be shared by team |
# |
Jul 10th 2019, 08:12 |
inoas |
https://gist.github.com/inoas/8c961851c9c9510c83e287ae14942fab |
# |
Jul 10th 2019, 08:11 |
charolastra |
i'm working on a remote VM. the justification is that the boss said so :P |
# |
Jul 10th 2019, 08:10 |
admad |
i am probably in minority who just develops locally on linux |
# |
Jul 10th 2019, 08:10 |
inoas |
it is for two cakephp apps living in application/http and application-ioms/http so you can strip out all the -ioms stuff (it is a service the main app relies on) |
# |
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 |