composite primary key in might_have relationship
[prev]
[thread]
[next]
[Date index for 2005/04/27]
Hi,
I am not sure this is do-able. Any suggestions?
I have two objects: eventpost and eventdatename2. Eventpost has two
FK fields that are composite primary keys in eventdatename2. I use
might_have as a relationship. Is that right? I can't access
eventdatename2 object and it gives me this error
BatchEvent::DateName2->retrieve(1501811) parameters don't include
values for all primary key columns (event_id name2_sequence) at
/dssweb/local-perl/lib/site_perl/5.8.3/Class/DBI/Relationship/MightHave.pm
line 46
Thanks,
Isarin
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
package BatchEvent::Post;=20
use base 'My::DBI';=20
use Class::DBI::Pager;=20
=20
__PACKAGE__->table('batchEventPost');=20
__PACKAGE__->columns( Primary =3D> qw/eventpost_id/ );=20
__PACKAGE__->columns( Essential =3D> qw/event_id post_time
cancel_sequence name2_sequence/ );
__PACKAGE__->has_a( event_id =3D> 'BatchEvent::Descriptive' );=20
__PACKAGE__->might_have( datename2 =3D> 'BatchEvent::DateName2' =3D>
qw/days name2/);
package BatchEvent::DateName2;=20
use base 'My::DBI';=20
__PACKAGE__->table('batchEventDateName2');=20
__PACKAGE__->columns( Primary =3D> qw/event_id name2_sequence/ );=20
__PACKAGE__->columns( Essential =3D> qw/days name2/ );
|
composite primary key in might_have relationship
H S 18:36 on 27 Apr 2005
|