associations - cakephp3: How to call functions of related models in both directions -
i have 3 models, a, b, , c, where
ahas 1b- and
ahas manyc.
if method a.update() called calls methods b.task() , c.task(), , contain, b , care available within a.
however if in b.sometask() method need call c.anothertask()?
if debug($this) in a, see entities b , c, if debug($this) in b or c see properties of entity.
should there not property in b (or c) references entity a well?
i know can adjust contain , add in a should contain b,c => [a], creates second sql query when should have a?
is there trickery missing here?
Comments
Post a Comment