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 | |
030c27ad | 9 | __PACKAGE__->table_class('DBIx::Class::ResultSource::View'); |
084a2c0a | 10 | __PACKAGE__->table('year2000cds'); |
a648ec78 | 11 | |
0d9fc72b | 12 | # need to operate on the instance for things to work |
13 | __PACKAGE__->result_source_instance->view_definition( sprintf ( | |
243e940e | 14 | 'SELECT %s FROM cd WHERE year = "2000"', |
0d9fc72b | 15 | join (', ', __PACKAGE__->columns), |
16 | )); | |
a648ec78 | 17 | |
59d89269 | 18 | __PACKAGE__->belongs_to( artist => 'DBICTest::Schema::Artist' ); |
98fcc1c0 | 19 | __PACKAGE__->has_many( tracks => 'DBICTest::Schema::Track', 'cd' ); |
59d89269 | 20 | |
a648ec78 | 21 | 1; |