Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Class::DBI Intro

by salvadors (Pilgrim)
on Aug 01, 2003 at 07:58 UTC ( #279880=note: print w/ replies, xml ) Need Help??


in reply to Re: Class::DBI Intro
in thread Class::DBI Intro

(but note that your join table still requires a primary key)

Actually, it doesn't always. As long as the relationship is unique, the cross-reference itself can be treated as a multi-column primary key, even if it isn't defined as such in the database.

Strange things can happen with this if you step off the (admittedly very narrow) beaten path, but for general cross-referencing it seems to work just fine.

Tony


Comment on Re: Re: Class::DBI Intro
Re^3: Class::DBI Intro
by mojotoad (Monsignor) on Aug 01, 2003 at 19:06 UTC
    Actually, it doesn't always. As long as the relationship is unique, the cross-reference itself can be treated as a multi-column primary key, even if it isn't defined as such in the database.

    Can you give an example? I'm still learning about Class::DBI, but thus far I have not found a way to avoid it claiming the first column as a primary key (in the absence of such a declaration in the DB table itself).

    Matt

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://279880]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2014-04-18 06:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (462 votes), past polls