me-- not thinking
[dbsrgits/DBIx-Class-Historic.git] / t / lib / DBICTest / Schema / Year2000CDs.pm
CommitLineData
0d9fc72b 1package # hide from PAUSE
a648ec78 2 DBICTest::Schema::Year2000CDs;
3
0d9fc72b 4use base qw/DBICTest::Schema::CD/;
a648ec78 5
030c27ad 6__PACKAGE__->table_class('DBIx::Class::ResultSource::View');
084a2c0a 7__PACKAGE__->table('year2000cds');
a648ec78 8
0d9fc72b 9# need to operate on the instance for things to work
10__PACKAGE__->result_source_instance->view_definition( sprintf (
243e940e 11 'SELECT %s FROM cd WHERE year = "2000"',
0d9fc72b 12 join (', ', __PACKAGE__->columns),
13));
a648ec78 14
59d89269 15__PACKAGE__->belongs_to( artist => 'DBICTest::Schema::Artist' );
18129e81 16__PACKAGE__->has_many( tracks => 'DBICTest::Schema::Track',
17 { "foreign.cd" => "self.cdid" });
59d89269 18
a648ec78 191;