Commit | Line | Data |
0d9fc72b |
1 | package # hide from PAUSE |
a648ec78 |
2 | DBICTest::Schema::Year2000CDs; |
3 | |
4a233f30 |
4 | use warnings; |
5 | use strict; |
6 | |
0d9fc72b |
7 | use base qw/DBICTest::Schema::CD/; |
a648ec78 |
8 | |
4c905568 |
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 | |
030c27ad |
14 | __PACKAGE__->table_class('DBIx::Class::ResultSource::View'); |
084a2c0a |
15 | __PACKAGE__->table('year2000cds'); |
a648ec78 |
16 | |
0d9fc72b |
17 | # need to operate on the instance for things to work |
18 | __PACKAGE__->result_source_instance->view_definition( sprintf ( |
954ce404 |
19 | "SELECT %s FROM cd WHERE year = '2000'", |
0d9fc72b |
20 | join (', ', __PACKAGE__->columns), |
21 | )); |
a648ec78 |
22 | |
59d89269 |
23 | __PACKAGE__->belongs_to( artist => 'DBICTest::Schema::Artist' ); |
98fcc1c0 |
24 | __PACKAGE__->has_many( tracks => 'DBICTest::Schema::Track', 'cd' ); |
59d89269 |
25 | |
a648ec78 |
26 | 1; |