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

2009-11-12 Thread Darren Duncan
Sean McAfee wrote: On Wed, Nov 11, 2009 at 10:21 PM, Darren Duncan wrote: >From my quick reading, the ResultSet documentation appears to be saying you need to provide an explicit 'key' attribute value when a match is being done on a non-primary key (aka unique constraint), rathe

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

2009-11-12 Thread Sean McAfee
On Wed, Nov 11, 2009 at 10:21 PM, Darren Duncan wrote: > Sean McAfee wrote: > >> 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 exceptio

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

2009-11-11 Thread Darren Duncan
Sean McAfee wrote: 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 B