# |
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 |
# |
Jul 10th 2019, 07:43 |
inoas |
aka INNER JOIN or NULL |
# |
Jul 10th 2019, 07:43 |
inoas |
however if there is no matching relation I want to still return the parent query result |
# |
Jul 10th 2019, 07:43 |
inoas |
so I got some innerJoin/matchings going - thus if I put a field=value condition only records with that condition would return |
# |
Jul 10th 2019, 07:42 |
inoas |
hello |
# |
Jul 10th 2019, 07:24 |
felix.robaglia |
Actually it works as the input gets autocomplete=off, but it completes it anyways |
# |
Jul 10th 2019, 07:21 |
felix.robaglia |
I tried 'autocomplete' => 'off' but it doesn't seem to work |
# |
Jul 10th 2019, 07:21 |
felix.robaglia |
Hello ! Is there an easy way to set autocomplete to off with form control ? this is my line of code : $this->Form->control('password', ['label' => 'password']); |
# |
Jul 9th 2019, 18:51 |
brian493 |
shame I had to rewrite my code in PDO to find that out haha |
# |
Jul 9th 2019, 18:51 |
brian493 |
ended up just removing my auto-increment id (really don't need it for what I'm doing to this data) and now cake transactions work |
# |
Jul 9th 2019, 18:50 |
brian493 |
you'd think making a non-transaction capable call would throw a fatal error, not silently exit the transaction and continue running queries |
# |
Jul 9th 2019, 18:49 |
brian493 |
dang |