Schema support added, DBICTest refactored to use it
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / CD.pm
1 package DBICTest::CD;
2
3 use base 'DBIx::Class::Core';
4
5 DBICTest::CD->table('cd');
6 DBICTest::CD->add_columns(qw/cdid artist title year/);
7 DBICTest::CD->set_primary_key('cdid');
8 DBICTest::CD->add_relationship(
9     artist => 'DBICTest::Artist',
10     { 'foreign.artistid' => 'self.artist' }
11 );
12 DBICTest::CD->add_relationship(
13     tracks => 'DBICTest::Track',
14     { 'foreign.cd' => 'self.cdid' }
15 );
16 DBICTest::CD->add_relationship(
17     tags => 'DBICTest::Tag',
18     { 'foreign.cd' => 'self.cdid' }
19 );
20 #DBICTest::CD->might_have(liner_notes => 'DBICTest::LinerNotes' => qw/notes/);
21
22 1;