X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-DBIx-Class-ResultSet-RecursiveUpdate;a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FFourKeys_to_TwoKeys.pm;fp=t%2Flib%2FDBICTest%2FSchema%2FFourKeys_to_TwoKeys.pm;h=6e8631362b16074171211b487d1886b61268fff2;hp=0000000000000000000000000000000000000000;hb=584713f437ffa9390821a0580ed368aa22fb552e;hpb=d93b1239cb7de482ac79a091d7daa67115596306 diff --git a/t/lib/DBICTest/Schema/FourKeys_to_TwoKeys.pm b/t/lib/DBICTest/Schema/FourKeys_to_TwoKeys.pm new file mode 100644 index 0000000..6e86313 --- /dev/null +++ b/t/lib/DBICTest/Schema/FourKeys_to_TwoKeys.pm @@ -0,0 +1,32 @@ +package # hide from PAUSE + DBICTest::Schema::FourKeys_to_TwoKeys; + +use base 'DBIx::Class::Core'; + +__PACKAGE__->table('fourkeys_to_twokeys'); +__PACKAGE__->add_columns( + 'f_foo' => { data_type => 'integer' }, + 'f_bar' => { data_type => 'integer' }, + 'f_hello' => { data_type => 'integer' }, + 'f_goodbye' => { data_type => 'integer' }, + 't_artist' => { data_type => 'integer' }, + 't_cd' => { data_type => 'integer' }, + 'autopilot' => { data_type => 'character' }, +); +__PACKAGE__->set_primary_key( + qw/f_foo f_bar f_hello f_goodbye t_artist t_cd/ +); + +__PACKAGE__->belongs_to('fourkeys', 'DBICTest::Schema::FourKeys', { + 'foreign.foo' => 'self.f_foo', + 'foreign.bar' => 'self.f_bar', + 'foreign.hello' => 'self.f_hello', + 'foreign.goodbye' => 'self.f_goodbye', +}); + +__PACKAGE__->belongs_to('twokeys', 'DBICTest::Schema::TwoKeys', { + 'foreign.artist' => 'self.t_artist', + 'foreign.cd' => 'self.t_cd', +}); + +1;