Addition of a bunch of helper relationship methods
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / HelperRels.pm
CommitLineData
0567538f 1package DBICTest::Schema::BasicRels;
2
3use base 'DBIx::Class::Core';
4
07037f89 5DBICTest::Schema::Artist->has_many(cds => 'DBICTest::Schema::CD', undef,
6 { order_by => 'year' });
7DBICTest::Schema::Artist->has_many(twokeys => 'DBICTest::Schema::TwoKeys');
8DBICTest::Schema::Artist->has_many(onekeys => 'DBICTest::Schema::OneKey');
0567538f 9
07037f89 10DBICTest::Schema::CD->belongs_to('artist', 'DBICTest::Schema::Artist');
0567538f 11
07037f89 12DBICTest::Schema::CD->has_many(tracks => 'DBICTest::Schema::Track');
13DBICTest::Schema::CD->has_many(tags => 'DBICTest::Schema::Tag');
0567538f 14
07037f89 15DBICTest::Schema::CD->might_have(liner_notes => 'DBICTest::Schema::LinerNotes' => qw/notes/);
0567538f 16
07037f89 17DBICTest::Schema::SelfRefAlias->belongs_to(
18 self_ref => 'DBICTest::Schema::SelfRef');
0567538f 19
07037f89 20DBICTest::Schema::SelfRefAlias->belongs_to(
21 alias => 'DBICTest::Schema::SelfRef');
0567538f 22
07037f89 23DBICTest::Schema::SelfRef->has_many(
24 aliases => 'DBICTest::Schema::SelfRefAlias' => 'self_ref');
0567538f 25
07037f89 26DBICTest::Schema::Tag->belongs_to('cd', 'DBICTest::Schema::CD');
27
28DBICTest::Schema::Track->belongs_to('cd', 'DBICTest::Schema::CD');
29
30DBICTest::Schema::TwoKeys->belongs_to('artist', 'DBICTest::Schema::Artist');
31
32DBICTest::Schema::TwoKeys->belongs_to('cd', 'DBICTest::Schema::CD');
0567538f 33
341;