![]() |
|
Perl: the Markov chain saw | |
PerlMonks |
Class::DBI and multiple foreign keysby silent11 (Vicar) |
on May 31, 2005 at 00:54 UTC ( #461888=perlquestion: print w/replies, xml ) | Need Help?? |
silent11 has asked for the wisdom of the Perl Monks concerning the following question:
After spending about an hour attempting to figure out why Class::DBI was croaking on a package that was defining a table with 2 foreign keys I realized that multiple foreign keys in one table isn't supported by Class::DBI.
Well, that's fine -- I'm just giving CDBI a test run, and I'm glad I found this little quirk out early in my usage with it. In this test application (a bookmarks/links app) I had 3 tables, `users`, `category`, and `links`. The link table contained the columns `id`,`category_id`,`user_id`,`url`,etc... My question is, why are multiple foreign keys such an evil thing? And what would be a better way to design this schema? Update:Okay, I got it working, despite the problme I *thought* I had. reading this helped me out. -silent11 Spread Firefox Janitored by Arunbear - moved from Meditations to SOPW. Also removed 'OT?' prefix from title.
Back to
Seekers of Perl Wisdom
|
|