[CDBI] Fwd: find_or_create() barfs with constraints

Peter Speltz peterspeltz at gmail.com
Wed Aug 3 02:24:03 BST 2005

On 8/2/05, Aaron Turner <aturner at musecurity.com> wrote:
> I'm looking to insert a record in table if it doesn't already exist.
> I've also created a unique key (across two columns) to prevent other
> access not via Class::DBI from causing problems.
> The issue seems however that when I do a Object->find_or_create
> ({ col1 => 'value', col2 => 'value'}) I get an error when it
> apparently tries to insert a duplicate record.

whats the error?  Are you sure it is the MK causing problem. It is
weird that it would not find your row.


More information about the ClassDBI mailing list