X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FCD.pm;h=552f16e0b8f5119943a78d4753364ae723dc3492;hb=97c96475;hp=80af1df36a809e1b2e6ca9e73ecbaeed192aafa4;hpb=cc9d96d02d84dd73db40b17d77739321fd354465;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest/Schema/CD.pm b/t/lib/DBICTest/Schema/CD.pm index 80af1df..552f16e 100644 --- a/t/lib/DBICTest/Schema/CD.pm +++ b/t/lib/DBICTest/Schema/CD.pm @@ -3,7 +3,10 @@ package # hide from PAUSE use base qw/DBICTest::BaseResult/; -__PACKAGE__->table('cd'); +# this tests table name as scalar ref +# DO NOT REMOVE THE \ +__PACKAGE__->table(\'cd'); + __PACKAGE__->add_columns( 'cdid' => { data_type => 'integer', @@ -23,6 +26,7 @@ __PACKAGE__->add_columns( 'genreid' => { data_type => 'integer', is_nullable => 1, + accessor => undef, }, 'single_track' => { data_type => 'integer', @@ -35,6 +39,10 @@ __PACKAGE__->add_unique_constraint([ qw/artist title/ ]); __PACKAGE__->belongs_to( artist => 'DBICTest::Schema::Artist', undef, { is_deferrable => 1, + proxy => { artist_name => 'name' }, +}); +__PACKAGE__->belongs_to( very_long_artist_relationship => 'DBICTest::Schema::Artist', 'artist', { + is_deferrable => 1, }); # in case this is a single-cd it promotes a track from another cd