Augment test suite with oddball relationship declarations
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / CD_to_Producer.pm
CommitLineData
8273e845 1package # hide from PAUSE
c6d74d3e 2 DBICTest::Schema::CD_to_Producer;
30a8108e 3
4a233f30 4use warnings;
5use strict;
6
660cf1be 7use base qw/DBICTest::BaseResult/;
30a8108e 8
9__PACKAGE__->table('cd_to_producer');
0009fa49 10__PACKAGE__->add_columns(
11 cd => { data_type => 'integer' },
12 producer => { data_type => 'integer' },
ac36a402 13 attribute => { data_type => 'integer', is_nullable => 1 },
0009fa49 14);
30a8108e 15__PACKAGE__->set_primary_key(qw/cd producer/);
16
98fcc1c0 17# the undef condition in this rel is *deliberate*
18# tests oddball legacy syntax
ff657a43 19__PACKAGE__->belongs_to(
98fcc1c0 20 'cd', 'DBICTest::Schema::CD'
ff657a43 21);
22
23__PACKAGE__->belongs_to(
24 'producer', 'DBICTest::Schema::Producer',
87310237 25 { 'foreign.producerid' => 'self.producer' },
26 { on_delete => undef, on_update => undef },
ff657a43 27);
28
30a8108e 291;