I've been seeing this error which I thought should never happen due to the
attempt to find by the key before creating a new record.

"DBIx::Class::ResultSet::find_or_create(): Error executing 'INSERT INTO
recipients (ciphered_email, domain, hashed_email_id) VALUES (?, ?, ?)':
Duplicate entry '1500' for key 2


Here is the corresponding code that is causing the error.

       $recipient = $c->model('kRadDB::Recipients')->find_or_create(
            {
                hashed_email_id => $hashed_email_id,
                domain          => $domain,
                ciphered_email  => $cipher->encrypt_hex($contact),
            },
            {
                key => 'hashed_email_id'
            }
        );


Any ideas on how to stop this error from happening?


Thanks,
  JK


_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to