[Dbix-class] is it safe use find_or_create in "read committed" transaction level

Peter Rabbitson rabbit+dbic at rabbit.us
Fri Sep 24 17:04:23 GMT 2010

Bill Crawford wrote:
> On 24 September 2010 15:40, Peter Rabbitson <rabbit+dbic at rabbit.us> wrote:
>> attempt insert
>>  if exception - attempt select
>>   if nothing found attempt insert again so you propagate the correct
>> exception
> while (1) {
>     try to create, return on success
>     try to update, return on success
> }

Hehe, except that when you mix in exceptions it will get slightly more
involved. Anyway - when you have a moment please give it a shot and
throw us a patch.


More information about the DBIx-Class mailing list