]> Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/blobdiff - t/lib/DBICTest/Schema/TwoKeyTreeLike.pm
tests from multicreate
[chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate] / t / lib / DBICTest / Schema / TwoKeyTreeLike.pm
diff --git a/t/lib/DBICTest/Schema/TwoKeyTreeLike.pm b/t/lib/DBICTest/Schema/TwoKeyTreeLike.pm
new file mode 100644 (file)
index 0000000..89d8e0a
--- /dev/null
@@ -0,0 +1,21 @@
+package # hide from PAUSE 
+    DBICTest::Schema::TwoKeyTreeLike;
+
+use base qw/DBIx::Class::Core/;
+
+__PACKAGE__->table('twokeytreelike');
+__PACKAGE__->add_columns(
+  'id1' => { data_type => 'integer' },
+  'id2' => { data_type => 'integer' },
+  'parent1' => { data_type => 'integer' },
+  'parent2' => { data_type => 'integer' },
+  'name' => { data_type => 'varchar',
+    size      => 100,
+ },
+);
+__PACKAGE__->set_primary_key(qw/id1 id2/);
+__PACKAGE__->add_unique_constraint('tktlnameunique' => ['name']);
+__PACKAGE__->belongs_to('parent', 'DBICTest::Schema::TwoKeyTreeLike',
+                          { 'foreign.id1' => 'self.parent1', 'foreign.id2' => 'self.parent2'});
+
+1;
This page took 0.017323 seconds and 4 git commands to generate.