What is your SQL debug output? You'll be able to see exactly how Cake
is building the queries and I'm sure it will answer your question.

On Jun 5, 10:10 am, fain182 <[email protected]> wrote:
> hello, i have a simple code like this:
>
>                 $param = array('order'=>array('Stato.stato', 'Sito.sito'));
>
>                 $this->Materiale->recursive = 2;
>
>                 $this->set('materiali', $this->Materiale->find('all',
> $param));
>                 $this->render('printer', 'blank', '/materiali/printer');
>
> my relations are:
> Materiale belongsto Sito
> Sito belongsto Stato
>
> if i run the code above, it gives me error:
> SQL Error: 1054: Unknown column 'Stato.stato' in 'order clause'
>
> but with recursive = 2, this should work
>
> and if i substitute the order with:
>               $param = array('order'=>array('Sito.sito'));
>
> this doesn't give me error, and, first of all, it shows me in the view
> the Stato!
>
> it's like Stato it's included usually, but not i I use it in 'order'..
>
> some ideas?
> thank you
> --
> pietro
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to