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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.