Merge branch 'master' into topic/constructor_rewrite
[dbsrgits/DBIx-Class.git] / t / lib / ViewDeps / Result / Artist.pm
diff --git a/t/lib/ViewDeps/Result/Artist.pm b/t/lib/ViewDeps/Result/Artist.pm
new file mode 100644 (file)
index 0000000..276288d
--- /dev/null
@@ -0,0 +1,21 @@
+package    # hide from PAUSE
+    ViewDeps::Result::Artist;
+
+use strict;
+use warnings;
+use base 'DBIx::Class::Core';
+
+__PACKAGE__->table('artist');
+
+__PACKAGE__->add_columns(
+    id   => { data_type => 'integer', is_auto_increment => 1 },
+    name => { data_type => 'text' },
+);
+
+__PACKAGE__->set_primary_key('id');
+
+__PACKAGE__->has_many( 'cds', 'ViewDeps::Result::CD',
+    { "foreign.artist" => "self.id" },
+);
+
+1;