Project

General

Profile

Patch #28939 » nested_set.patch

Pavel Rosický, 2018-06-04 00:49

View differences:

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
(2-2/2)