i have three tables paymanet ,user and things.... if i ask payment i can get users also by $Payment >payment> user that`s ok one payment has one user!! Now i want to ask things by payment like $Payment->things here one payment has many things.
first: can i make an association between rows that are not ID? for example: Payment || user || thing id || id || id user_id || . || rnr? to associate by rnr from payment? rnr || . || .... second if that not possible how should the class for payment created and which rows do i need in table "thing"???
Subject: Associations
Hello together,
i am a beginner so my questions maybe stupid ;-)
i have three tables paymanet ,user and things....
if i ask payment i can get users also by $Payment
>payment> user that`s ok one payment has one user!!Now i want to ask things by payment like $Payment->things here one payment has many things.
first: can i make an association between rows that are not ID? for example:
Payment || user || thing
id || id || id
user_id || . || rnr? to associate by rnr from payment?
rnr || . ||
....
second if that not possible how should the class for payment created and which rows do i need in table "thing"???
Hope someone can help...
with best reguards Carsten