# |
Apr 19th 2017, 08:41 |
ankr |
neon1024 get that coffee maker running asap |
# |
Apr 19th 2017, 08:39 |
Neon1024 |
That ^ |
# |
Apr 19th 2017, 08:39 |
inoas |
belongsToMany() ;) |
# |
Apr 19th 2017, 08:39 |
Neon1024 |
As it’ll be included automagically |
# |
Apr 19th 2017, 08:39 |
Neon1024 |
If it’s a hasAndBelongsToMany() then you don’t need to contain it |
# |
Apr 19th 2017, 08:39 |
Neon1024 |
Yeah |
# |
Apr 19th 2017, 08:39 |
inoas |
maybe you want a real model then ;) |
# |
Apr 19th 2017, 08:39 |
inoas |
containing a pivot table sounds weirdo |
# |
Apr 19th 2017, 08:38 |
inoas |
the example is still here https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#using-finders-to-load-data |
# |
Apr 19th 2017, 08:38 |
inoas |
urgh |
# |
Apr 19th 2017, 08:38 |
Neon1024 |
https://pastebin.com/wkFB33ep |
# |
Apr 19th 2017, 08:37 |
joop |
Neon would you show me the 3 way please |
# |
Apr 19th 2017, 08:36 |
joop |
Guest71037 try the History tab |
# |
Apr 19th 2017, 08:36 |
Neon1024 |
Well it’s very Cake 2 |
# |
Apr 19th 2017, 08:36 |
Neon1024 |
Your query is all wrong |
# |
Apr 19th 2017, 08:35 |
joop |
https://pastebin.com/TNtPkvwK |
# |
Apr 19th 2017, 08:35 |
Guest71037 |
in debugkit, the sql tab is empty, is there any way to fix this or debug it to see why |
# |
Apr 19th 2017, 08:35 |
joop |
no 3 |
# |
Apr 19th 2017, 08:35 |
Neon1024 |
Ah Cake 2 |
# |
Apr 19th 2017, 08:33 |
joop |
but UsrsRoles['user_id'] or ['users_roles']['user_id'] does not works |
# |
Apr 19th 2017, 08:32 |
joop |
'users_roles'=>['user_id //what need to check |
# |
Apr 19th 2017, 08:32 |
joop |
but can not acces to data specific field |
# |
Apr 19th 2017, 08:31 |
joop |
i can get it bay the contain |
# |
Apr 19th 2017, 08:31 |
joop |
Users->Roles->UsersRoles |
# |
Apr 19th 2017, 08:31 |
joop |
i have to make a query in a HABT association |
# |
Apr 19th 2017, 08:29 |
joop |
thank you ionas |
# |
Apr 19th 2017, 08:29 |
inoas |
so I couldn't sleep to 8:30 :p |
# |
Apr 19th 2017, 08:29 |
inoas |
same but our boy awoke 3 times |
# |
Apr 19th 2017, 08:28 |
Neon1024 |
My own fault, I went to bed at midnight, so only got about 6 hours sleep |
# |
Apr 19th 2017, 08:27 |
inoas |
you are not the only one. |
# |
Apr 19th 2017, 08:26 |
Neon1024 |
ankr, Struggling to get started today |
# |
Apr 19th 2017, 08:26 |
inoas |
things are not going smooth then |
# |
Apr 19th 2017, 08:26 |
inoas |
I got foreign keys that can have nullable parts... meh |
# |
Apr 19th 2017, 08:26 |
ankr |
all good neon1024 ? :slightly_smiling_face: |
# |
Apr 19th 2017, 08:25 |
Neon1024 |
$this->Examples->find(‘all’, [‘conditions’ => [‘foo’ => $bar]]); === $this->Examples->find()->where([‘foo’ => $bar]); |
# |
Apr 19th 2017, 08:24 |
inoas |
however that you can use setFinder() and then use the new style query builder |
# |
Apr 19th 2017, 08:24 |
inoas |
the only place I use "condition" is in associations via "setConditions()" |
# |
Apr 19th 2017, 08:24 |
inoas |
where is new style syntax |
# |
Apr 19th 2017, 08:24 |
joop |
good morning |
# |
Apr 19th 2017, 08:24 |
inoas |
joop: condition is - more or less - old style syntax |
# |
Apr 19th 2017, 08:16 |
Neon1024 |
ankr* |