Commit | Line | Data |
0567538f |
1 | package DBICTest::Schema::BasicRels; |
2 | |
3 | use base 'DBIx::Class::Core'; |
4 | |
07037f89 |
5 | DBICTest::Schema::Artist->has_many(cds => 'DBICTest::Schema::CD', undef, |
6 | { order_by => 'year' }); |
7 | DBICTest::Schema::Artist->has_many(twokeys => 'DBICTest::Schema::TwoKeys'); |
8 | DBICTest::Schema::Artist->has_many(onekeys => 'DBICTest::Schema::OneKey'); |
0567538f |
9 | |
07037f89 |
10 | DBICTest::Schema::CD->belongs_to('artist', 'DBICTest::Schema::Artist'); |
0567538f |
11 | |
07037f89 |
12 | DBICTest::Schema::CD->has_many(tracks => 'DBICTest::Schema::Track'); |
13 | DBICTest::Schema::CD->has_many(tags => 'DBICTest::Schema::Tag'); |
0567538f |
14 | |
503536d5 |
15 | DBICTest::Schema::CD->might_have(liner_notes => 'DBICTest::Schema::LinerNotes', |
16 | undef, { proxy => [ qw/notes/ ] }); |
0567538f |
17 | |
07037f89 |
18 | DBICTest::Schema::SelfRefAlias->belongs_to( |
19 | self_ref => 'DBICTest::Schema::SelfRef'); |
0567538f |
20 | |
07037f89 |
21 | DBICTest::Schema::SelfRefAlias->belongs_to( |
22 | alias => 'DBICTest::Schema::SelfRef'); |
0567538f |
23 | |
07037f89 |
24 | DBICTest::Schema::SelfRef->has_many( |
25 | aliases => 'DBICTest::Schema::SelfRefAlias' => 'self_ref'); |
0567538f |
26 | |
07037f89 |
27 | DBICTest::Schema::Tag->belongs_to('cd', 'DBICTest::Schema::CD'); |
28 | |
7b601771 |
29 | DBICTest::Schema::Track->belongs_to('cd', 'DBICTest::Schema::CD', 'cdid'); |
07037f89 |
30 | |
31 | DBICTest::Schema::TwoKeys->belongs_to('artist', 'DBICTest::Schema::Artist'); |
32 | |
33 | DBICTest::Schema::TwoKeys->belongs_to('cd', 'DBICTest::Schema::CD'); |
0567538f |
34 | |
35 | 1; |