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)
In reply to 3Re: Class::DBI has_a relationships
by jeffa
in thread Class::DBI has_a relationships
by CassJ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |