This project is archived and is in readonly mode.

#6399 ✓resolved
Jesse Storimer

Allow database specific locking clauses to be used

Reported by Jesse Storimer | February 9th, 2011 @ 04:03 PM | in 3.0.5

AR docs say that you can use a custom locking clause like so:

Product.find(1, :lock => 'LOCK IN SHARE MODE')
 # select * from products where id=1 LOCK IN SHARE MODE

But currently arel always uses 'FOR UPDATE' (

This pull request for arel fixes the bug:

Wanted to make sure this makes it in for the 3.0.5 release.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>