Note sure if this is a bug/feature of SQL::Abstract or DBIC, but recording
here for posterity and solution ideas:
If I want to create a row with all default values, I can call
->create({}).. for SQLite, this produces:
DBIx::Class::Schema::Journal::txn_do(): DBI Exception: DBD::SQLite::db
prepare_cached failed: near ")": syntax error(1) at dbdimp.c line 269 [for
Statement "INSERT INTO changeset () VALUES ()"] at t/01test.t line 33
looking at the SQLite bug database, I see:
http://www.sqlite.org/cvstrac/tktview?tn=299
Which looks like we need to either produce:
INSERT INTO table (<pk>) VALUES(NULL) (if there is a pk)
or INSERT INTO table DEFAULT VALUES (it looks on the bug report as this
will do the above, dunno what happens if there is no pk field.. )
Where should this munging go?
Jess
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/