On Tue, 8 Jan 2008, Erik Colson wrote:
Erik Colson wrote:
does this mean it is possible to do such a thing :
$newrecord = $rs->new({id=>DEFAULT}) ;
and then
$newrecord->insert ;
would autoincrement id if id is defined as a primary key autoincrement ?
Hate replying to myself ...
but this seems to work with sqlite3
$newrecord = $rs->new({}) ;
$newrecord->insert ;
would this work for all database backends available in DBIx::Class ?
No, cos some insist that you pass DEFAULT to get the default value,
passing nothing is an error.
Yes, not all databases work the same. Yes, this is bloody annoying.
It wouldnt be a bad idea for the various Storage::DBI subclasses to
standardise this..
Jess
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]