That is the same thing I did, lol however I explained it wrong and
figured out my problem seeing as how I was doing ListOffer rather then
the join table. I just noticed for what I was using I didn't need the
data just to make sure that it existed. So I was able to just do $this-
>User->CompletedOffers->findAll(conditions);
On Nov 16, 10:10 am, Petr 'PePa' Pavel <[EMAIL PROTECTED]> wrote:
> Hi mate, this code is for 1.2:
>
> $this->User->find('all', array(
> 'conditions' => array(
> 'User.id' => $this->Auth->user('id'),
> 'ListOffer.id' => $offerid
> )
> ));
>
> Petrhttp://blog.pepa.info/
>
> Dne 16.11.2008 19:06, thatsgreat2345 napsal(a):
>
> > I have a HABTM association between user and listoffer however when I
> > run
> > $this->User->findAll(array('User.id'=>$this->Auth->user
> > ('id'),'ListOffer.id'=>$offerid));
> > the debug doesn't show the sql for grabbing the ListOffer, and so it
> > wont get the offer for that userid has completed. So is there some way
> > to add a where statement on a HABTM association.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---