revert 45a380dc2d68e828de4011b99f0c3739db5b0707
Rafael Kitover [Thu, 22 Apr 2010 00:45:43 +0000 (20:45 -0400)]
Changes
lib/DBIx/Class/Schema/Loader/RelBuilder.pm
t/lib/dbixcsl_common_tests.pm

diff --git a/Changes b/Changes
index f6da418..8f58d78 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,7 +1,5 @@
 Revision history for Perl extension DBIx::Class::Schema::Loader
 
-        - remove is_deferrable from default rel options to maintain
-          principle of least surprise when round-tripping to deploy()
         - support CamelCase table names
         - rewrite datetime default functions as \'CURRENT_TIMESTAMP' where
           possible (except for Sybase ASE) to ease cross-deployment
index 5e83da5..e6a2c92 100644 (file)
@@ -163,6 +163,7 @@ sub _default_relationship_attrs { +{
     belongs_to => {
         on_delete => 'CASCADE',
         on_update => 'CASCADE',
+        is_deferrable => 1,
     },
 } }
 
index 546e072..283805d 100644 (file)
@@ -604,8 +604,8 @@ sub test_schema {
         is $rsobj4->result_source->relationship_info('fkid_singular')->{attrs}{on_update}, 'CASCADE',
             "on_update => 'CASCADE' on belongs_to by default";
 
-        ok ((not exists $rsobj4->result_source->relationship_info('fkid_singular')->{attrs}{is_deferrable}),
-            'belongs_to does not have is_deferrable');
+        is $rsobj4->result_source->relationship_info('fkid_singular')->{attrs}{is_deferrable}, 1,
+            "is_deferrable => 1 on belongs_to by default";
 
         ok ((not exists $rsobj4->result_source->relationship_info('fkid_singular')->{attrs}{cascade_delete}),
             'belongs_to does not have cascade_delete');