X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FOracle%2FGeneric.pm;h=636e40e168a3a06135a118f0f4b42171fb72cdb4;hb=74113bd1;hp=2b4ce757bf0c661e254f54e53b679cb70257450f;hpb=2a89732de61a563cdae68fc0a28fdcf3f6798827;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm b/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm index 2b4ce75..636e40e 100644 --- a/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm +++ b/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm @@ -419,11 +419,17 @@ sub _dbi_attrs_for_bind { my $attrs = $self->next::method($ident, $bind); - for my $i (0 .. $#$attrs) { - if (keys %{$attrs->[$i]||{}} and my $col = $bind->[$i][0]{dbic_colname}) { - $attrs->[$i]{ora_field} = $col; - } - } + # Push the column name into all bind attrs, make sure to *NOT* write into + # the existing $attrs->[$idx]{..} hashref, as it is cached by the call to + # next::method above. + $attrs->[$_] + and + keys %{ $attrs->[$_] } + and + $bind->[$_][0]{dbic_colname} + and + $attrs->[$_] = { %{$attrs->[$_]}, ora_field => $bind->[$_][0]{dbic_colname} } + for 0 .. $#$attrs; $attrs; }