]> Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/blobdiff - t/lib/DBSchema/Result/Dvd.pm
got rid of the requirement to add id => undef
[chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate] / t / lib / DBSchema / Result / Dvd.pm
index f761f764300ab2195275cbecaa23f43d530fa20d..e791b76fc721c16e15760fd321fac3ff5dbfbd80 100644 (file)
@@ -40,19 +40,25 @@ __PACKAGE__->add_columns(
     data_type => 'datetime',
     is_nullable => 1,
   },
+  'twokeysfk' => {
+    data_type => 'integer',
+    is_nullable => 1,
+  },
 );
 __PACKAGE__->set_primary_key('id');
 __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__->has_many('viewings', 'DBSchema::Result::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' } );
-
+__PACKAGE__->add_relationship('like_has_many2', 'DBSchema::Result::Twokeys_belongsto', 
+    { 'foreign.key1' => 'self.twokeysfk' }, 
+); 
 
 1;
 
This page took 0.020522 seconds and 4 git commands to generate.