X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FBookmark.pm;h=40cfa3f3f9f195bf24f305b2598f4e4ce0afab6a;hb=b8fd17d994cb050835e2fe80d8f309fea7d167f1;hp=bb32a14b3b7ad6bb64dbbb818101690e6c259a8e;hpb=660cf1be74795a5a5784f413741816413a724c1a;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/lib/DBICTest/Schema/Bookmark.pm b/t/lib/DBICTest/Schema/Bookmark.pm index bb32a14..40cfa3f 100644 --- a/t/lib/DBICTest/Schema/Bookmark.pm +++ b/t/lib/DBICTest/Schema/Bookmark.pm @@ -1,12 +1,11 @@ package # hide from PAUSE DBICTest::Schema::Bookmark; - use base qw/DBICTest::BaseResult/; - - use strict; use warnings; +use base qw/DBICTest::BaseResult/; + __PACKAGE__->table('bookmark'); __PACKAGE__->add_columns( 'id' => { @@ -15,10 +14,18 @@ __PACKAGE__->add_columns( }, 'link' => { data_type => 'integer', + is_nullable => 1, }, ); __PACKAGE__->set_primary_key('id'); -__PACKAGE__->belongs_to(link => 'DBICTest::Schema::Link' ); + +require DBICTest::Schema::Link; # so we can get a columnlist +__PACKAGE__->belongs_to( + link => 'DBICTest::Schema::Link', 'link', { + on_delete => 'SET NULL', + join_type => 'LEFT', + proxy => { map { join('_', 'link', $_) => $_ } DBICTest::Schema::Link->columns }, +}); 1;