Cake does a JOIN across belongsTo and hasOne, because there can be
only a single related row (so the results are much easier to
extract). I thought there was an enhancement ticket on trac to add
this functionality for hasMany, but I can't see it now.
For the time being, yes, if you cannot exe
Very thank You for the answer.
> The
> query you had in the middle of your post that "strangely works" is not
> so strange - you are querying the Photo table, so of course you can
> use Photo conditions.
I meant, that in this way I can use conditions on both Models - this
on example should be m
The findAll conditions are not as smart as you think they are. What
you pass in the conditions array is directly what is used in the SQL
WHERE clause - which is only going to be on the Realization table
(then additional queries to find associated Photos will be done). The
query you had in the mi
Hi,
I'm having problem with fieldnames from associated models in
findAll(). I saw it quite common for others.
The result from $this->Realization->findAll() - as below - shows that
associations works ok, BUT when try to condition on Photo it is wrong
e.g. $this->Realization->findAll('Photo.id = 5