On May 5, 10:05 am, AD7six <[email protected]> wrote:
> On May 4, 10:26 am, Roland B <[email protected]> wrote:
>
> > Hi,
>
> > is there a way to change the structure of data returned by a model's
> > find call? Or should I use a different call? IMHO, the default seems
> > to be inconsistent in the way it handles associations:
>
> > Given this model:
> > //---------------------------------------
> > class Querycategory extends AppModel
> > {
> > var $recursive = 10;
> > var $hasMany = array(
> > 'Querycategory' => array('order' => 'name ASC'), <--
>
> you can't use the same alias twice - the conventional way to do it -
> if you aren't using the tree behavior of course - would be to use
> Parent and/or child
>
> var $hasMany = array('Parent' => ('className' => 'Querycategory'
oops
var $belongsTo = array('Parent' => ('className' =>
'Querycategory', ...
var $hasMany = array('Child' => ('className' => 'Querycategory', ...
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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