super basic test for dm::sqlt
[dbsrgits/DBIx-Class-DeploymentHandler.git] / t / lib / DBICTest / Schema / Year2000CDs.pm
CommitLineData
b974984a 1package # hide from PAUSE
2 DBICTest::Schema::Year2000CDs;
3
4use base qw/DBICTest::Schema::CD/;
5
6__PACKAGE__->table_class('DBIx::Class::ResultSource::View');
7__PACKAGE__->table('year2000cds');
8
9# need to operate on the instance for things to work
10__PACKAGE__->result_source_instance->view_definition( sprintf (
11 'SELECT %s FROM cd WHERE year = "2000"',
12 join (', ', __PACKAGE__->columns),
13));
14
15__PACKAGE__->belongs_to( artist => 'DBICTest::Schema::Artist' );
16__PACKAGE__->has_many( tracks => 'DBICTest::Schema::Track',
17 { "foreign.cd" => "self.cdid" });
18
191;