[Dbix-class] Unique constraint isn't good enough for update_or_create?

Sean McAfee eefacm at gmail.com
Fri Nov 6 18:45:45 GMT 2009


I have a table that doesn't have a primary key, but does a unique index.
When I call update_or_create on this table, I can create the row just fine,
but when I try to update it with a second call, this exception gets thrown:

Cannot safely update a row in a PK-less table

But the documentation for DBIx::Class::ResultSet explicitly says that the
method can use unique constraints.  So why isn't it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20091106/193=
d98c5/attachment.htm


More information about the DBIx-Class mailing list