[Dbix-class] How to

Dave Howorth dhoworth at mrc-lmb.cam.ac.uk
Tue Jun 19 13:28:03 GMT 2012


Joerg Braun wrote:
> On Tue, 19 Jun 2012 10:26:19 +0100, Dave Howorth
>> I still don't understand the UPDATE vs INSERT issue.
>>
> In his first mail he told us that a user has to seelct a minimum value from
> some table. That has to be valid until the insert committed. He wants to
> avoid a second user in receiving the same minimum value.
> 
> His idea was to lock the table for reading until the insert is done, which
> would create a new minimum value.

SELECT FOR UPDATE locks for UPDATE, not for INSERT, according to the manual.



More information about the DBIx-Class mailing list