X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-DBIx-Class-ResultSet-RecursiveUpdate;a=blobdiff_plain;f=t%2Flib%2FDBSchema%2FResult%2FDvd.pm;h=f761f764300ab2195275cbecaa23f43d530fa20d;hp=4908080ee9893275207e91b7d690fae134eb6875;hb=264a28fa4c2fdab1244cdba5c9e606ce8c411c0a;hpb=2708ae1178c582e52969f2f1882884733c729b25;ds=sidebyside diff --git a/t/lib/DBSchema/Result/Dvd.pm b/t/lib/DBSchema/Result/Dvd.pm index 4908080..f761f76 100644 --- a/t/lib/DBSchema/Result/Dvd.pm +++ b/t/lib/DBSchema/Result/Dvd.pm @@ -42,14 +42,16 @@ __PACKAGE__->add_columns( }, ); __PACKAGE__->set_primary_key('id'); -__PACKAGE__->belongs_to('owner', 'User', { id => 'owner' }); -__PACKAGE__->belongs_to('current_borrower', 'User', { id => 'current_borrower' }); +__PACKAGE__->belongs_to('owner', 'DBSchema::Result::User', { id => 'owner' }); +__PACKAGE__->belongs_to('current_borrower', 'DBSchema::Result::User', { id => 'current_borrower' }); __PACKAGE__->has_many('dvdtags', 'Dvdtag', { 'foreign.dvd' => 'self.id' }); +__PACKAGE__->has_many('viewings', 'Viewing', { 'foreign.dvd_id' => 'self.id' }); __PACKAGE__->many_to_many('tags', 'dvdtags' => 'tag'); __PACKAGE__->might_have( liner_notes => 'DBSchema::Result::LinerNotes', undef, { proxy => [ qw/notes/ ] }, ); +__PACKAGE__->add_relationship('like_has_many', 'DBSchema::Result::Twokeys', { 'foreign.dvd_name' => 'self.name' }, { accessor_name => 'like_has_many' } ); 1;