[Dbix-class] Problem w/ PK::Auto and DBIx::Class 0.06003 and SQLite3?
George Hartzell
hartzell at alerce.com
Sat Jul 8 01:12:27 CEST 2006
I've been playing with my first DBIx::Class app. I'd roughed it out
in Class::DBI, which I've used before, and found that performance
loading data via Class::DBI wasn't acceptable. I figured I'd see what
kind of a speed up I get with DBIx::Class before I write a DBI based
bulkloader.
I'm running on FreeBSD 6.1 and installed DBIx::Class via ports (which
gave me 0.06003).
I have a table with an id column, and am using ->load(qw/PK::Auto Core/)
to get automatically incrementing values for the primary key.
When I run a little script to insert something into one of the tables
and back the app up with a Postgresql database, everything works as I
expect.
When I run the same app but use an SQLite3 db, the id column value
never ends up in the db (as seen w/ the sqlite command line app). If
I run the app in the perl debugger and set a breakpoint in
DBIX::Class::PK::Auto::insert, the next value for the id column is
determined corretly and if I ask for the ->id() field of the resulting
object I get a value that I expect. It is even incremented correctly
with each run of the app. It just never seems to be stored back into
the db.
I've tried ->update and ->txn_commit on the off chance that I was
somehow not automatically flushing changes out to disk, but that
didn't help.
Before I extract an example that I can share with the group, are there
any known screwinesses with auto incrementing columns and SQLite3?
Thanks,
g.
More information about the Dbix-class
mailing list