Some test suite corrections ahead of next commits
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / Year2000CDs.pm
1 package # hide from PAUSE
2     DBICTest::Schema::Year2000CDs;
3
4 use warnings;
5 use strict;
6
7 use base qw/DBICTest::Schema::CD/;
8
9 # FIXME not entirely sure *why* this particular bit trips up tests
10 # and even more mysteriously: only a single oracle test...
11 # Running out of time and no local Oracle so can't investigate :/
12 use mro 'c3';
13
14 __PACKAGE__->table_class('DBIx::Class::ResultSource::View');
15 __PACKAGE__->table('year2000cds');
16
17 # need to operate on the instance for things to work
18 __PACKAGE__->result_source_instance->view_definition( sprintf (
19   "SELECT %s FROM cd WHERE year = '2000'",
20   join (', ', __PACKAGE__->columns),
21 ));
22
23 __PACKAGE__->belongs_to( artist => 'DBICTest::Schema::Artist' );
24 __PACKAGE__->has_many( tracks => 'DBICTest::Schema::Track', 'cd' );
25
26 1;