Re: 2 queries on same model during same call

2007-03-06 Thread francky06l
Yes SQL statement with Debug to 2 are ok so I am sure I am doing something wrong, this data model (this is a short view here) begins to be complex. Anyway, I will examine everything again, maybe after one night of good sleep will be better.. Yes everything follows convention, but when I began with

Re: 2 queries on same model during same call

2007-03-06 Thread AD7six
On Mar 6, 8:36 am, "francky06l" <[EMAIL PROTECTED]> wrote: > Sorry for the bad references, actually is use hasMany relation in both > cases for the foreign model. So basically : > > model Application > var $hasMany => array('Company' => array('className' => > 'Company', > > 'foreignKey' =>

Re: 2 queries on same model during same call

2007-03-05 Thread francky06l
Sorry for the bad references, actually is use hasMany relation in both cases for the foreign model. So basically : model Application var $hasMany => array('Company' => array('className' => 'Company', 'foreignKey' => 'application_id'), array('Applicant' => arr

Re: 2 queries on same model during same call

2007-03-05 Thread Grant Cox
In future, don't refer to all of your models as "model" - make up names like User, Group, Student, School, whatever you like, just so we can follow what you are saying easier :) I am guessing the problem is that one of your models has multiple associations to the same foreign model, and the probl

2 queries on same model during same call

2007-03-05 Thread francky06l
Hello, I have a model that "hasmany" models, and 2 of the submodel "hasmany" of the same model. So this "common" model follow the following rule : id modelx_id modely_id When I query the top model (recursive 3) I get the common model data for the first submodel, but not for the second. Turning