]> Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/blobdiff - t/lib/DBICTest/Schema/CD_to_Producer.pm
tests from multicreate
[chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate] / t / lib / DBICTest / Schema / CD_to_Producer.pm
diff --git a/t/lib/DBICTest/Schema/CD_to_Producer.pm b/t/lib/DBICTest/Schema/CD_to_Producer.pm
new file mode 100644 (file)
index 0000000..8028c7b
--- /dev/null
@@ -0,0 +1,31 @@
+package # hide from PAUSE 
+    DBICTest::Schema::CD_to_Producer;
+
+use base 'DBIx::Class::Core';
+
+__PACKAGE__->table('cd_to_producer');
+__PACKAGE__->add_columns(
+  cd => { data_type => 'integer' },
+  producer => { data_type => 'integer' },
+);
+__PACKAGE__->set_primary_key(qw/cd producer/);
+
+__PACKAGE__->belongs_to(
+  'cd', 'DBICTest::Schema::CD',
+  { 'foreign.cdid' => 'self.cd' }
+);
+
+__PACKAGE__->belongs_to(
+  'producer', 'DBICTest::Schema::Producer',
+  { 'foreign.producerid' => 'self.producer' },
+  { on_delete => undef, on_update => undef },
+);
+
+__PACKAGE__->resultset_class( __PACKAGE__ . '::ResultSet');
+
+package DBICTest::Schema::CD_to_Producer::ResultSet;
+
+use base qw( DBIx::Class::ResultSet::RecursiveUpdate );
+
+
+1;
This page took 0.02007 seconds and 4 git commands to generate.