Re: Many to Many relationships

[prev] [thread] [next] [Date index for 2004/05/06]

From: Perrin Harkins
Subject: Re: Many to Many relationships
Date: 20:37 on 06 May 2004
On Thu, 2004-05-06 at 16:38, Bryon Bean wrote:
> I'm having a problem figuring out why I'm only getting the first row
> returned multiple times for a many to many table. Could someone please point
> me in the right direction? TIA...
> 
> package ShowdateArtist;
> __PACKAGE__->table('showdate_artist');
> __PACKAGE__->columns( All => qw/ showdate_id artist_id order_of_appearance
> / );
> __PACKAGE__->has_a( showdate_id => 'Showdate' );
> __PACKAGE__->has_a( artist_id   => 'Artists'   );

You didn't declare your primary key in this table.  When you just say
"All" like this, the first column is assumed to be the primary key.  

- Perrin

Many to Many relationships
Bryon Bean 20:38 on 06 May 2004

Re: Many to Many relationships
Perrin Harkins 20:37 on 06 May 2004

Generated at 11:35 on 01 Dec 2004 by mariachi v0.52