X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FSelfRefAlias.pm;h=40e181f472b0e798e5e894e73a4e39075d1088ec;hb=7f3fd2621c5509873aa30e7a68b7dd670421cc86;hp=785fcc6d7a35bf70a310f696f31804b254e9aa91;hpb=ccae0573e39c15a598d9640aaf8e6d31fcadc01e;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest/Schema/SelfRefAlias.pm b/t/lib/DBICTest/Schema/SelfRefAlias.pm index 785fcc6..40e181f 100644 --- a/t/lib/DBICTest/Schema/SelfRefAlias.pm +++ b/t/lib/DBICTest/Schema/SelfRefAlias.pm @@ -1,20 +1,20 @@ -package DBICTest::Schema::SelfRefAlias; - -use base 'DBIx::Class::Core'; - -__PACKAGE__->table('self_ref_alias'); -__PACKAGE__->add_columns(qw/self_ref alias/); -__PACKAGE__->set_primary_key('self_ref alias'); -__PACKAGE__->add_relationship( - self_ref => 'DBICTest::Schema::SelfRef', - { 'foreign.id' => 'self.self_ref' }, - { accessor => 'single' } - -); -__PACKAGE__->add_relationship( - alias => 'DBICTest::Schema::SelfRef', - { 'foreign.id' => 'self.alias' }, - { accessor => 'single' } -); - -1; +package # hide from PAUSE + DBICTest::Schema::SelfRefAlias; + +use base qw/DBICTest::BaseResult/; + +__PACKAGE__->table('self_ref_alias'); +__PACKAGE__->add_columns( + 'self_ref' => { + data_type => 'integer', + }, + 'alias' => { + data_type => 'integer', + }, +); +__PACKAGE__->set_primary_key(qw/self_ref alias/); + +__PACKAGE__->belongs_to( self_ref => 'DBICTest::Schema::SelfRef' ); +__PACKAGE__->belongs_to( alias => 'DBICTest::Schema::SelfRef' ); + +1;