X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-DBIx-Class-ResultSet-RecursiveUpdate;a=blobdiff_plain;f=t%2Flib%2FDBSchema%2FResult%2FTwokeys_belongsto.pm;fp=t%2Flib%2FDBSchema%2FResult%2FTwokeys_belongsto.pm;h=3f35aa03ef76567923f97249bb80a303f1f16904;hp=0000000000000000000000000000000000000000;hb=5460c3fd3d2063eb55dd8a72bf3335952f1950b7;hpb=863ebdd6ecb92e434d8f18f91c79ebdf0e937fe3 diff --git a/t/lib/DBSchema/Result/Twokeys_belongsto.pm b/t/lib/DBSchema/Result/Twokeys_belongsto.pm new file mode 100644 index 0000000..3f35aa0 --- /dev/null +++ b/t/lib/DBSchema/Result/Twokeys_belongsto.pm @@ -0,0 +1,24 @@ +package DBSchema::Result::Twokeys_belongsto; + +# Created by DBIx::Class::Schema::Loader v0.03000 @ 2006-10-02 08:24:09 + +use strict; +use warnings; + +use base 'DBIx::Class'; + +__PACKAGE__->load_components("PK::Auto", "Core"); +__PACKAGE__->table("twokeys_belongsto"); +__PACKAGE__->add_columns( + "key1" => { data_type => 'integer' }, + "key2" => { data_type => 'integer' }, +); +__PACKAGE__->set_primary_key("key1", "key2"); + +__PACKAGE__->add_relationship('like_belongs_to', 'DBSchema::Result::Dvd', { 'foreign.twokeysfk' => 'self.key1' }, ); + +__PACKAGE__->belongs_to('onekey', 'DBSchema::Result::Onekey', { 'foreign.id' => 'self.key1' }, ); + + +1; +