Thursday, July 15, 2010

Re: trouble with models associations

i found a solution

On 12 Jul., 19:45, duderion <adrian.g...@googlemail.com> wrote:
> *bump* :(
>
> On 8 Jul., 22:18, duderion <adrian.g...@googlemail.com> wrote:
>
> > hi guys,
>
> > i have a (noob) question:
>
> > i have
>
> > - product model with the primary key id, a unique key "Zupid" and so
> > on
> > - fav model with  "zupid" "user_id" ...
> > - user model "id" "name" ...
>
> > i want to connect the tables fav and product with the key "zupid"
>
> > i guess
>
> > fav belongs to user, product
>
> > when i access fav in my view, the userdata connected to the fav works,
> > but the productdata is null (correct structure, but null everywhere)
>
> > how can i associate them to have both userdata and productdata in the
> > $fav array... ?
>
> > my core problem is that even if i say "product has many fav", cake
> > tries to compare fav.zupid with product.id and not with product.zupid
>
> > Tx in advance
> > duderion

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate