in reply to DBIx-Class: find_or_create() duplicating entries.

Without going into details here, it was my understanding that your add_unique_constraint must be reflected in your database by adding a UNIQUE INDEX on these fields so the database engine will loudly complain if you add duplicate entries. I did not think DBIx::Class will by itself check these unique constraints and will rely on the much more optimized routines of the database engine.

Then again, I did not study the innards of DBIx::Class so I may be miles off the mark.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Replies are listed 'Best First'.
Re^2: DBIx-Class: find_or_create() duplicating entries.
by j1n3l0 (Friar) on Jan 22, 2007 at 11:49 UTC

    fixed the problem. i was updating the time on each occasion thus each was different from the last. thanks for your help.