Extend proxy rel attr
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / CD.pm
index 80af1df..552f16e 100644 (file)
@@ -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