1 package # hide from PAUSE
2 ViewDepsBad::Result::Year2010CDsWithManyTracks;
6 use base 'ViewDepsBad::Result::Year2010CDs';
8 __PACKAGE__->table_class('DBIx::Class::ResultSource::View');
9 __PACKAGE__->table('year_2010_cds_with_many_tracks');
10 __PACKAGE__->result_source_instance->view_definition(
11 "SELECT cd.id,cd.title,cd.artist,cd.year,cd.number_tracks,art.file FROM year_2010_cds cd JOIN artwork art on art.cd = cd.id WHERE cd.number_tracks > 10"
14 __PACKAGE__->result_source_instance->deploy_depends_on(
15 ["ViewDepsBad::Result::Year2010CDs"] );
17 __PACKAGE__->add_columns(
18 id => { data_type => 'integer', is_auto_increment => 1 },
19 title => { data_type => 'text' },
20 artist => { data_type => 'integer', is_nullable => 0 },
21 year => { data_type => 'integer' },
22 number_tracks => { data_type => 'integer' },
23 file => { data_type => 'integer' },
26 __PACKAGE__->set_primary_key('id');
28 __PACKAGE__->belongs_to( 'artist', 'ViewDepsBad::Result::Artist',
29 { "foreign.id" => "self.artist" },
32 __PACKAGE__->has_many( 'tracks', 'ViewDepsBad::Result::Track',
33 { "foreign.cd" => "self.id" },