Add strict/warnings test, adjust all offenders (wow, that was a lot)
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / Bookmark.pm
index cac4841..40cfa3f 100644 (file)
@@ -1,12 +1,11 @@
 package # hide from PAUSE
     DBICTest::Schema::Bookmark;
 
-    use base 'DBIx::Class::Core';
-
-
 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;