Hi Bakers,

These are my model relations, in general terms:

[ModelA] belongsTo [ModelB] belongsTo [ModelC] belongsTo [ModelD]

I'm calling ModelA->contain(...)

In my contain I'm successfully retrieving fields all the way down to
Model D.

However, when it comes to ordering, I get errors when trying to order
by fields in model C or D.

Unknown column 'ModelC.field' in 'order clause'

>From the SQL, it's clear the problem is that models C and D are
accessed via different,
individual queries per model (Select `ModelC`.field FROM `ModelC`),
and re-integrated into the results set, whilst the ordering statements
are of course in the initial query.

I'm around 1.2 RC2.

Is this a known issue? Are there any solutions/work arounds? I really
don't want to manually re-sort my data :(

Thanks,

Woody


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to