in reply to many to many with Class::DBI
replace
with__PACKAGE__->columns(All => qw(user_id role_id));
and your code should work (it does here ;-).__PACKAGE__->columns(Primary => qw(user_id role_id));
an error likely to be overlooked! I spotted it reading the Class::DBI documentation; I don't know what the difference in the generated code is, and frankly: I don't care ;-) It's a cool module!
Edit:tested with perl 5.8.3 and Class::DBI 0.95. without the mentioned change I didn't get your error but wrong results (all three roles as 'typist') instead.
regards,
tomte
Hlade's Law:
If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: many to many with Class::DBI
by hardburn (Abbot) on Feb 12, 2004 at 14:06 UTC | |
by Tomte (Priest) on Feb 12, 2004 at 14:33 UTC | |
by hardburn (Abbot) on Feb 12, 2004 at 15:30 UTC | |
by Tomte (Priest) on Feb 12, 2004 at 16:21 UTC | |
by hardburn (Abbot) on Feb 12, 2004 at 16:57 UTC | |
| |
by Anonymous Monk on Feb 12, 2004 at 14:41 UTC | |
|
Re: Re: many to many with Class::DBI
by jdtoronto (Prior) on Feb 12, 2004 at 15:02 UTC |