misspelling
[dbsrgits/DBIx-Class-Historic.git] / t / lib / DBICTest / Schema / CD_to_Producer.pm
index 4c111c4..b4b064a 100644 (file)
@@ -1,9 +1,29 @@
-package DBICTest::Schema::CD_to_Producer;
+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(qw/cd 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'
+);
+
+__PACKAGE__->belongs_to(
+  'producer', 'DBICTest::Schema::Producer',
+  { 'foreign.producerid' => 'self.producer' },
+  { on_delete => undef, on_update => undef },
+);
+
 1;