[Dbix-class] find_or_create and unique constraints
Peter Rabbitson
rabbit+dbic at rabbit.us
Sun Oct 3 07:43:57 GMT 2010
Bill Moseley wrote:
> I'm wondering if find_or_create should throw an exception if a unique
> constraint does not exist or if the values passed to find_or_create do
> not include ALL the columns in the constraint.
DBIx::Class is a tool, it does not enforce "design cleanliness". Heck it
even works with pk-less tables if need be, there is a ton of crappy
preexisting schemas out there. To get what you want simply turn on
FATAL warnings and perl will DTRT :)
Btw how is the patch for find_or_create coming along?
Cheers
More information about the DBIx-Class
mailing list