1 package # hide from PAUSE
6 use base 'DBIx::Class::Core';
8 __PACKAGE__->table('cd');
10 __PACKAGE__->add_columns(
11 id => { data_type => 'integer', is_auto_increment => 1 },
12 title => { data_type => 'text' },
13 artist => { data_type => 'integer', is_nullable => 0 },
14 year => { data_type => 'integer' },
15 number_tracks => { data_type => 'integer' },
18 __PACKAGE__->set_primary_key('id');
20 __PACKAGE__->refers_to( 'artist', 'ViewDeps::Result::Artist',
21 { "foreign.id" => "self.artist" },
24 __PACKAGE__->has_many( 'tracks', 'ViewDeps::Result::Track',
25 { "foreign.cd" => "self.id" },