From: Rafael Kitover Date: Tue, 24 May 2011 15:24:33 +0000 (-0400) Subject: Revert "set cascade_update => 0 on might_have relationships" X-Git-Tag: 0.07011~107 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2d349a576b9690ffa81141a2e7b2489fadb7ef1b;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Revert "set cascade_update => 0 on might_have relationships" This reverts commit 9b1dd93554ec8f70923940e2ae88e2e0260d0b55. --- diff --git a/Changes b/Changes index f8ead40..06a78b7 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,5 @@ Revision history for Perl extension DBIx::Class::Schema::Loader - - set cascade_update => 0 on might_have relationships - generate POD for result_base_class, additional_classes, additional_base_classes, left_base_classes, components, result_components_map, result_roles and result_roles_map diff --git a/lib/DBIx/Class/Schema/Loader/RelBuilder.pm b/lib/DBIx/Class/Schema/Loader/RelBuilder.pm index 96318b4..14307e9 100644 --- a/lib/DBIx/Class/Schema/Loader/RelBuilder.pm +++ b/lib/DBIx/Class/Schema/Loader/RelBuilder.pm @@ -192,7 +192,6 @@ sub _default_relationship_attrs { +{ might_have => { cascade_delete => 0, cascade_copy => 0, - cascade_update => 0, }, belongs_to => { on_delete => 'CASCADE', diff --git a/t/lib/dbixcsl_common_tests.pm b/t/lib/dbixcsl_common_tests.pm index 20dbb0b..bc7cd8a 100644 --- a/t/lib/dbixcsl_common_tests.pm +++ b/t/lib/dbixcsl_common_tests.pm @@ -102,7 +102,7 @@ sub run_tests { $num_rescans++ if $self->{vendor} eq 'Firebird'; plan tests => @connect_info * - (202 + $num_rescans * $col_accessor_map_tests + $extra_count + ($self->{data_type_tests}{test_count} || 0)); + (199 + $num_rescans * $col_accessor_map_tests + $extra_count + ($self->{data_type_tests}{test_count} || 0)); foreach my $info_idx (0..$#connect_info) { my $info = $connect_info[$info_idx]; @@ -556,7 +556,7 @@ sub test_schema { } SKIP: { - skip $self->{skip_rels}, 123 if $self->{skip_rels}; + skip $self->{skip_rels}, 120 if $self->{skip_rels}; my $moniker3 = $monikers->{loader_test3}; my $class3 = $classes->{loader_test3}; @@ -715,9 +715,6 @@ sub test_schema { is try { $rsobj3->result_source->relationship_info('loader_test4zes')->{attrs}{cascade_copy} }, 0, 'cascade_copy => 0 on has_many by default'; - ok ((not try { exists $rsobj3->result_source->relationship_info('loader_test4zes')->{attrs}{cascade_update} }), - 'has_many does not have cascade_update'); - ok ((not try { exists $rsobj3->result_source->relationship_info('loader_test4zes')->{attrs}{on_delete} }), 'has_many does not have on_delete'); @@ -742,18 +739,12 @@ sub test_schema { ok ((not try { exists $rsobj4->result_source->relationship_info('fkid_singular')->{attrs}{cascade_copy} }), 'belongs_to does not have cascade_copy'); - ok ((not try { exists $rsobj4->result_source->relationship_info('fkid_singular')->{attrs}{cascade_update} }), - 'belongs_to does not have cascade_update'); - is try { $rsobj27->result_source->relationship_info('loader_test28')->{attrs}{cascade_delete} }, 0, 'cascade_delete => 0 on might_have by default'; is try { $rsobj27->result_source->relationship_info('loader_test28')->{attrs}{cascade_copy} }, 0, 'cascade_copy => 0 on might_have by default'; - is try { $rsobj27->result_source->relationship_info('loader_test28')->{attrs}{cascade_update} }, 0, - 'cascade_update => 0 on might_have by default'; - ok ((not try { exists $rsobj27->result_source->relationship_info('loader_test28')->{attrs}{on_delete} }), 'might_have does not have on_delete');