in reply to Re: Re: Class::DBI has_a relationships
in thread Class::DBI has_a relationships
That (what you have) declares that a User has many Sessions::Metadata and that a Session has many Sessions::Metadata, but you also have to tell Sessions::Metadata that it references Users and Sessions as well.
My snippet in question is specifying that a User can have many Sessions::Metadata classes, and the Users' foreign key 'session_id' references the Sessions::Metadata primary key 'id'. Now, whether or not this is the right fit for your database table relationship is the question, and since i don't know what it looks like, i can only speculate.
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 3Re: Class::DBI has_a relationships
by CassJ (Sexton) on May 18, 2004 at 17:30 UTC | |
by jeffa (Bishop) on May 18, 2004 at 17:44 UTC | |
by CassJ (Sexton) on May 18, 2004 at 18:03 UTC |