ok! With recurision = 2 I got it!
But... now I have 24 Queries for only 3 elements!
I trying to use
$this->Jobber->contain('Anagrafica.dt_nascita');
but I have this error:
"Error: SQLSTATE[42000]: Syntax error or access violation: 1064 You
have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'contain'
at line 1"
Why?
On 11 Feb, 10:20, Byteo <[email protected]> wrote:
> I trying to use containable behaviour but I really don't have nothing
> about anagrafica model from my find all query jobber...
> My problem is not data filtering... But otherwise to have some data!!
> Take a look to my model chain on first post...where is the problem?
>
> Thank you!
>
> On Feb 9, 10:54 am, phpMagpie <[email protected]> wrote:
>
>
>
>
>
>
>
> > Did you try using containable ... you really should as it saves you so much
> > time and has many options to only pull the models and fields you require.
>
> > CakePHP will not 'automagically' perform a join two levels deep. If you
> > need that (and you should only need this if doing a find which requires
> > conditions on all three tables at once - otherwise just use containable)
> > then you can do a find on the middle model (User) and it will join it's
> > hasOne and belongsTo associated models (you need to add User hasOne Jobber).
>
> > Can I ask why you are breaking from conventions with your table names?
> > This sort of thing is counter-intuitive as your instantly working with a
> > non-standard app and when asking for support people will expect you to be
> > using the standards.
>
> > HTH, Paul.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php