Patch #28939 » nested_set.patch
| issue_nested_set.rb (working copy) | ||
|---|---|---|
|
end
|
||
|
def lock_nested_set
|
||
|
if self.class.connection.adapter_name =~ /sqlserver/i
|
||
|
if self.class.connection.adapter_name.casecmp('sqlserver') == 0
|
||
|
lock = "WITH (ROWLOCK HOLDLOCK UPDLOCK)"
|
||
|
# Custom lock for SQLServer
|
||
|
# This can be problematic if root_id or parent root_id changes
|
||
| project_nested_set.rb (working copy) | ||
|---|---|---|
|
def lock_nested_set
|
||
|
lock = true
|
||
|
if self.class.connection.adapter_name =~ /sqlserver/i
|
||
|
if self.class.connection.adapter_name.casecmp('sqlserver') == 0
|
||
|
lock = "WITH (ROWLOCK HOLDLOCK UPDLOCK)"
|
||
|
end
|
||
|
self.class.order(:id).lock(lock).ids
|
||
- « Previous
- 1
- 2
- Next »