[Dbix-class] get Defaults after create
Rolf Schaufelberger
rs at plusw.de
Mon Jan 28 16:32:17 GMT 2008
Hi,
is there a way to tell create to fetch the inserted column after insertion, so
that default values, defined in the database (or added by triggers) are
present in the returned object ?
Currently I have to do
my $obj = $schema->resultset('XY')->create({...} );
$obj = $schema->resultset('XY')->find($obj->id);
while
my $obj = $schema->resultset('XY')->create({...} , {fetch=>1});
would be nicer.
--
Rolf Schaufelberger
More information about the DBIx-Class
mailing list