Merge branch 'master' into topic/constructor_rewrite
[dbsrgits/DBIx-Class.git] / t / lib / ViewDepsBad / Result / Artwork.pm
diff --git a/t/lib/ViewDepsBad/Result/Artwork.pm b/t/lib/ViewDepsBad/Result/Artwork.pm
new file mode 100644 (file)
index 0000000..978e196
--- /dev/null
@@ -0,0 +1,22 @@
+package    # hide from PAUSE
+    ViewDepsBad::Result::Artwork;
+
+use strict;
+use warnings;
+use base 'DBIx::Class::Core';
+
+__PACKAGE__->table('artwork');
+
+__PACKAGE__->add_columns(
+    id            => { data_type => 'integer', is_auto_increment => 1 },
+    cd         => { data_type => 'integer' },
+    file          => { data_type => 'text' },
+);
+
+__PACKAGE__->set_primary_key('id');
+
+__PACKAGE__->belongs_to( 'cd', 'ViewDepsBad::Result::CD',
+    { "foreign.id" => "self.cd" },
+);
+
+1;