X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRow.pm;h=72bb2fcdc8edf9cfa8d504bb41e540ee2acfe413;hb=b230b4bee9367c652bc213f09053386a5f9aeb12;hp=b2eee57f316c5bc106bf82ff6df89fa54bca1068;hpb=0bad18237edb8e1967fede05b9e5bcf13799f52c;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Row.pm b/lib/DBIx/Class/Row.pm index b2eee57..72bb2fc 100644 --- a/lib/DBIx/Class/Row.pm +++ b/lib/DBIx/Class/Row.pm @@ -647,6 +647,8 @@ sub has_column_loaded { Returns all loaded column data as a hash, containing raw values. To get just one value for a particular column, use L. +See L to get the inflated values. + =cut sub get_columns { @@ -708,7 +710,21 @@ sub make_column_dirty { $self->throw_exception( "No such column '${column}'" ) unless exists $self->{_column_data}{$column} || $self->has_column($column); + + # the entire clean/dirty code relieas on exists, not on true/false + return 1 if exists $self->{_dirty_columns}{$column}; + $self->{_dirty_columns}{$column} = 1; + + # if we are just now making the column dirty, and if there is an inflated + # value, force it over the deflated one + if (exists $self->{_inflated_column}{$column}) { + $self->store_column($column, + $self->_deflated_column( + $column, $self->{_inflated_column}{$column} + ) + ); + } } =head2 get_inflated_columns @@ -909,7 +925,11 @@ sub set_inflated_columns { Inserts a new row into the database, as a copy of the original object. If a hashref of replacement data is supplied, these will take -precedence over data in the original. +precedence over data in the original. Also any columns which have +the L +C<< is_auto_increment => 1 >> are explicitly removed before the copy, +so that the database can insert its own autoincremented values into +the new object. Relationships will be followed by the copy procedure B if the relationship specifes a true value for its