# |
May 30th 2016, 08:51 |
ionas |
have a great afternoon, I feel a bit sad that I have to go home from cakefest now |
# |
May 30th 2016, 08:50 |
ionas |
phpcoder: if you are using the opt-out feature you may want to consider adding the clause()->traverse() trick to the book as a PR to the docs <3 |
# |
May 30th 2016, 08:48 |
ionas |
you will be happier later not repeating my mistakes :pö |
# |
May 30th 2016, 08:47 |
ionas |
got it? |
# |
May 30th 2016, 08:47 |
phpcoder |
yes ok |
# |
May 30th 2016, 08:47 |
ionas |
instead of hacking opt-out |
# |
May 30th 2016, 08:47 |
phpcoder |
yeah there could be many |
# |
May 30th 2016, 08:47 |
ionas |
you might want to consider fixing your query composition |
# |
May 30th 2016, 08:47 |
ionas |
however as I said |
# |
May 30th 2016, 08:47 |
ionas |
maybe :) |
# |
May 30th 2016, 08:47 |
phpcoder |
ionas, maybe i can read the "matching" property of the Query object |
# |
May 30th 2016, 08:47 |
ionas |
~book |
# |
May 30th 2016, 08:47 |
ionas |
leftJoinWith, innerJoinWith, etc. etc |
# |
May 30th 2016, 08:46 |
ionas |
donâ??t forget that there is also leftJoin(), matching(), notMatching() and possibly contain() (1:1) that builds joins as well as array syntax for those things (I did not use that for the most part since 2.x so I cant say) |
# |
May 30th 2016, 08:46 |
phpcoder |
thanks |
# |
May 30th 2016, 08:45 |
phpcoder |
ah ok! |
# |
May 30th 2016, 08:45 |
ionas |
$query->clause(â??innerJoinWithâ??)->traverse(function ($expression) use |
# |
May 30th 2016, 08:44 |
ionas |
as it reads parts of the composed query |
# |
May 30th 2016, 08:44 |
ionas |
phpcoder: this is not the solution however maybe you can find a way from there https://gist.github.com/ionas/71dc55939fd70536b89f187ee0693c52 |
# |
May 30th 2016, 08:43 |
phpcoder |
ok |
# |
May 30th 2016, 08:42 |
ionas |
make smaller compositions you could say |
# |
May 30th 2016, 08:42 |
ionas |
then you donâ??t have to ask these kind of questions |
# |
May 30th 2016, 08:42 |
ionas |
you want opt-in only |
# |
May 30th 2016, 08:42 |
ionas |
you are looking at a design problem |
# |
May 30th 2016, 08:42 |
ionas |
phpcoder: in general |
# |
May 30th 2016, 08:41 |
phpcoder |
hi ionas ! thanks |
# |
May 30th 2016, 08:41 |
birdy247 |
ionas awesome |
# |
May 30th 2016, 08:41 |
ionas |
phpcoder: let me check if I can find a snippet and if its worth it |
# |
May 30th 2016, 08:40 |
ionas |
there is also this https://github.com/cakephp/app/pull/363/files birdy247 - so thatâ??s the change you might want to do (or inject a timezone off the users request and / or session setting) |
# |
May 30th 2016, 08:40 |
phpcoder |
guys is it possible to check if a query object has a specific join ? |
# |
May 30th 2016, 08:39 |
birdy247 |
great stuff ionas |
# |
May 30th 2016, 08:39 |
birdy247 |
awesome |
# |
May 30th 2016, 08:38 |
ionas |
birdy https://github.com/cakephp/cakephp/pull/8753 |
# |
May 30th 2016, 08:38 |
birdy247 |
https://github.com/cakephp/cakephp/pull/8588 |
# |
May 30th 2016, 08:38 |
birdy247 |
:slightly_smiling_face: |
# |
May 30th 2016, 08:37 |
ionas |
;p |
# |
May 30th 2016, 08:37 |
ionas |
JohnWayne, birdy247: yes, fork/pull it from my repo, fix the missing unit test, PR and use in 3.3 :p |
# |
May 30th 2016, 08:37 |
JohnWayne |
@ionas - is there any manual how to use this PR? |
# |
May 30th 2016, 08:37 |
birdy247 |
will this be included in 3.3 |
# |
May 30th 2016, 08:37 |
birdy247 |
awesome |
# |
May 30th 2016, 08:36 |
birdy247 |
:+1: |