X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FTwoKeyTreeLike.pm;h=1ee8409969aa631153abbecefa64c4d7e1e6ac0f;hb=f70b86f99991081454c96e305ba1c046473113b4;hp=9547baf4d8099e20f3f5f0546f97e477ae686294;hpb=637ca936ff3aeee87af89aaaf75e2035c29576f8;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/lib/DBICTest/Schema/TwoKeyTreeLike.pm b/t/lib/DBICTest/Schema/TwoKeyTreeLike.pm index 9547baf..1ee8409 100644 --- a/t/lib/DBICTest/Schema/TwoKeyTreeLike.pm +++ b/t/lib/DBICTest/Schema/TwoKeyTreeLike.pm @@ -1,9 +1,7 @@ package # hide from PAUSE DBICTest::Schema::TwoKeyTreeLike; -use base qw/DBIx::Class/; - -__PACKAGE__->load_components(qw/Core/); +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('twokeytreelike'); __PACKAGE__->add_columns( @@ -16,7 +14,8 @@ __PACKAGE__->add_columns( }, ); __PACKAGE__->set_primary_key(qw/id1 id2/); -__PACKAGE__->belongs_to('parent', 'TwoKeyTreeLike', +__PACKAGE__->add_unique_constraint('tktlnameunique' => ['name']); +__PACKAGE__->belongs_to('parent', 'DBICTest::Schema::TwoKeyTreeLike', { 'foreign.id1' => 'self.parent1', 'foreign.id2' => 'self.parent2'}); 1;