Hi,

I tried this:

$this->paginate = array(
            'conditions' => array(
                'Agentprovision.agent_id' => $id
            ),
            'fields' => array(
                'Agentprovision.id', 'Agentprovision.apr_status',
'Agentprovision.apr_summe', 'Payment.created'
            ),
            'contain' => array(
                'Payment.id',
                'Member.id'
            )
        );

But I get this message:
Model "Agentprovision" is not associated with model "Member"

Which is correct. But I don't understand, because I get the Payments,
and from the Payments I have the member_id reference to the Members
table.
So somehow I should get able to get the member data anyhow?

On 12 Mrz., 18:26, John Andersen <j.andersen...@gmail.com> wrote:
> How does you find statement look like?
> Are you using the Containable behaviour?
> Enjoy,
>    John
>
> On Mar 12, 1:33 pm,heohni<heidi.anselstet...@consultingteam.de>
> wrote:
>
>
>
> > Hi,
>
> > I have the following structure:
>
> > Member belongsTo Agent
> > Member hasMany Payment
>
> > Payment belongsTo Agentprovision
> > Payment belongsTo Member
>
> > Agent hasMany Agentprovision
> > Agent hasMany Member
>
> > Agentprovision belongsTo Agent
> > Agentprovision belongsTo Payment
>
> > In my Agent Controller I want to no select
> > => each Agentprovision with its Payment and its Member
>
> > I do:
> > $this->Agent->Agentprovision->recursive = 0;
> > $this->Agent->Agentprovision->unBindModel(array('belongsTo' =>
> > array('Agent')), false); // to exclude all Agent relevant infos for
> > the moment
>
> > This gives me:
>
> > Array
> > (
> >     [0] => Array
> >         (
> >             [Agentprovision] => Array
> >                 (
> >                     [id] => 188
> >                     [payment_id] => 1795
> > ...
> >             [Payment] => Array
> >                 (
> >                     [id] => 1795
> >                     [member_id] => 5
> > ...
> > )
>
> > I do not understand, why I cant collect the member details here...?
> > As my Payment have the reference with the member_id?
>
> > Any ideas what could be wrong?

-- 
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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to