X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FTag.pm;h=40bd9456e9f3336a0decbd0f6f0c3f40986e8d4e;hb=4a233f3019d2baa4bf2abee0c873c74d5cdf3a11;hp=796616e8788f1f2c91e017101efe59c0c9871fc0;hpb=660cf1be74795a5a5784f413741816413a724c1a;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest/Schema/Tag.pm b/t/lib/DBICTest/Schema/Tag.pm index 796616e..40bd945 100644 --- a/t/lib/DBICTest/Schema/Tag.pm +++ b/t/lib/DBICTest/Schema/Tag.pm @@ -1,6 +1,9 @@ -package # hide from PAUSE +package # hide from PAUSE DBICTest::Schema::Tag; +use warnings; +use strict; + use base qw/DBICTest::BaseResult/; __PACKAGE__->table('tags'); @@ -19,6 +22,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;