Augment test suite with oddball relationship declarations
[dbsrgits/DBIx-Class-Historic.git] / t / lib / DBICTest / Schema / CD_to_Producer.pm
index cf18c4e..b4b064a 100644 (file)
@@ -1,18 +1,23 @@
-package # hide from PAUSE 
+package # hide from PAUSE
     DBICTest::Schema::CD_to_Producer;
 
-use base 'DBIx::Class::Core';
+use warnings;
+use strict;
+
+use base qw/DBICTest::BaseResult/;
 
 __PACKAGE__->table('cd_to_producer');
 __PACKAGE__->add_columns(
   cd => { data_type => 'integer' },
   producer => { data_type => 'integer' },
+  attribute => { data_type => 'integer', is_nullable => 1 },
 );
 __PACKAGE__->set_primary_key(qw/cd producer/);
 
+# the undef condition in this rel is *deliberate*
+# tests oddball legacy syntax
 __PACKAGE__->belongs_to(
-  'cd', 'DBICTest::Schema::CD',
-  { 'foreign.cdid' => 'self.cd' }
+  'cd', 'DBICTest::Schema::CD'
 );
 
 __PACKAGE__->belongs_to(