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=b75c2efa5a316872385e426655e62f46c35f22f3;hpb=ff657a4317312f9fc858e128affaf97aa46c336b;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest/Schema/Tag.pm b/t/lib/DBICTest/Schema/Tag.pm index b75c2ef..40bd945 100644 --- a/t/lib/DBICTest/Schema/Tag.pm +++ b/t/lib/DBICTest/Schema/Tag.pm @@ -1,7 +1,10 @@ -package # hide from PAUSE +package # hide from PAUSE DBICTest::Schema::Tag; -use base qw/DBIx::Class::Core/; +use warnings; +use strict; + +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('tags'); __PACKAGE__->add_columns( @@ -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;