From: Rafael Kitover Date: Tue, 13 Apr 2010 23:05:57 +0000 (-0400) Subject: use accessor => undef for conflicting columns instead X-Git-Tag: 0.07000~65 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1e4730815c9321bd2381dd7db176ee496f84a8d4;p=dbsrgits%2FDBIx-Class-Schema-Loader.git use accessor => undef for conflicting columns instead --- diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index c9dd108..74b777e 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -1421,7 +1421,7 @@ sub _resolve_col_accessor_collisions { next if $accessor eq 'id'; # XXX fix this in DBIC if (exists $methods{$accessor}) { - $info->{accessor} = ucfirst $accessor; + $info->{accessor} = undef; } } } diff --git a/t/lib/dbixcsl_common_tests.pm b/t/lib/dbixcsl_common_tests.pm index 3ad36a3..c4e750f 100644 --- a/t/lib/dbixcsl_common_tests.pm +++ b/t/lib/dbixcsl_common_tests.pm @@ -304,11 +304,11 @@ sub test_schema { my @columns_lt2 = $class2->columns; is_deeply( \@columns_lt2, [ qw/id dat dat2 set_primary_key dbix_class_testcomponent/ ], "Column Ordering" ); - is $class2->column_info('set_primary_key')->{accessor}, 'Set_primary_key', - 'accessor for column name that conflicts with a result base class method renamed'; + is $class2->column_info('set_primary_key')->{accessor}, undef, + 'accessor for column name that conflicts with a result base class method removed'; - is $class2->column_info('dbix_class_testcomponent')->{accessor}, 'Dbix_class_testcomponent', - 'accessor for column name that conflicts with a component class method renamed'; + is $class2->column_info('dbix_class_testcomponent')->{accessor}, undef, + 'accessor for column name that conflicts with a component class method removed'; my %uniq1 = $class1->unique_constraints; my $uniq1_test = 0;