What is recursive set to? Should be set to 1 in order to retrieve
second level related information (Client)!
Enjoy,
   John

On Jun 8, 7:59 am, trav <johnstont...@gmail.com> wrote:
> Hi,
>
> I hope someone can give me some assistance with Plugin models.
>
> Cake Version: 1.3.2
> ==================
> Problem: Query result does not build model joins when using a plugin
> ==================
> Location: Model files are in app/plugin/Myplugin/models
> Plugin Name: Myplugin
>
> Model A:
> ------------------
> class Client extends AppModel {
>         var $name = 'Client';
>
> }
>
> Model B:
> -------------------
> class Account extends AppModel {
>         var $name = 'Account';
>         var $belongsTo = 'Myplugin.Client';
>
> }
>
> Call:
> ---------------
> $data = $this->Account->find('all');
>
> Query output from cake/libs/models/model.php (line 2086):
> --------------------
> Array
> (
>     [conditions] => Array
>         (
>         )
>
>     [fields] =>
>     [joins] => Array
>         (
>         )
>
>     [limit] =>
>     [offset] =>
>     [order] => Array
>         (
>             [0] =>
>         )
>
>     [page] => 1
>     [group] =>
>     [callbacks] => 1
> )
>
> Result:
> -------------------------
> Array
> (
>     [0] => Array
>         (
>             [Account] => Array
>                 (
>                     [id] => 85
>                     [client_id] => 1
>                 )
>
>         )
>
>     [1] => Array
>         (
>             [Account] => Array
>                 (
>                     [id] => 86
>                     [client_id] => 2
>                 )
>
>         )
> )

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 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