[Dbix-class] creating a row that's empty but for an auto-incremented key?

George Hartzell hartzell at alerce.com
Sat Jul 8 03:42:20 CEST 2006


Brett Gardner writes:
 > if you do
 > 
 > $foo = $schema->resultset('Foo')->new({});
 > $foo->bar('bar');
 > $foo->insert;

Thanks, that should work for what I'm trying to do.

Even with this approach, it's still not possible to insert a row in
which all of the columns except the primary key are non-existent/NULL
and have the key be automagically generated via PK::Auto, right?

Thanks again,

g.




More information about the Dbix-class mailing list