Merge branch 'master' into topic/constructor_rewrite
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / Tag.pm
index 796616e..ad56361 100644 (file)
@@ -1,4 +1,4 @@
-package # hide from PAUSE 
+package # hide from PAUSE
     DBICTest::Schema::Tag;
 
 use base qw/DBICTest::BaseResult/;
@@ -19,6 +19,17 @@ __PACKAGE__->add_columns(
 );
 __PACKAGE__->set_primary_key('tagid');
 
-__PACKAGE__->belongs_to( cd => 'DBICTest::Schema::CD' );
+__PACKAGE__->add_unique_constraints(  # do not remove, part of a test
+  tagid_cd     => [qw/ tagid cd /],
+  tagid_cd_tag => [qw/ tagid cd tag /],
+);
+__PACKAGE__->add_unique_constraints(  # do not remove, part of a test
+  [qw/ tagid tag /],
+  [qw/ tagid tag cd /],
+);
+
+__PACKAGE__->belongs_to( cd => 'DBICTest::Schema::CD', 'cd', {
+  proxy => [ 'year', { cd_title => 'title' } ],
+});
 
 1;