[Dbix-class] get Defaults after create

Chisel Wright chisel at herlpacker.co.uk
Mon Jan 28 17:23:04 GMT 2008


On Mon, Jan 28, 2008 at 05:32:17PM +0100, Rolf Schaufelberger wrote:
> Currently I have to do
> 
> my $obj = $schema->resultset('XY')->create({...} );
> $obj = $schema->resultset('XY')->find($obj->id);

or:

$obj->discard_changes;

> my $obj = $schema->resultset('XY')->create({...} , {fetch=>1});
> 
> would be nicer.

It would be 'nice' to not have to create-then-discard, but
discard_changes() is something I'm happy to live with - it's not /that/
painful IMO

-- 
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/

  AFK, tornado...



More information about the DBIx-Class mailing list