From: Johannes Plunien Date: Tue, 6 Nov 2007 21:56:44 +0000 (+0000) Subject: update row object after storage has run the insert statement. So the row contains... X-Git-Tag: v0.08240~533^2~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ef5f6b0af1821ac2ad432233f5cdebbb5a681e08;p=dbsrgits%2FDBIx-Class.git update row object after storage has run the insert statement. So the row contains the automatically fetched nextval of the oracle sequence. --- diff --git a/lib/DBIx/Class/Row.pm b/lib/DBIx/Class/Row.pm index 6ac92bf..b85d006 100644 --- a/lib/DBIx/Class/Row.pm +++ b/lib/DBIx/Class/Row.pm @@ -207,7 +207,8 @@ sub insert { } } - $source->storage->insert($source, { $self->get_columns }); + my $updated_cols = $source->storage->insert($source, { $self->get_columns }); + $self->set_columns($updated_cols); ## PK::Auto my @auto_pri = grep {