Fixes a problem with the SQL Adapter which was resulting in IDENTITY_INSERT not being set to ON when it should be #1104 [adelle]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
44073321a8
commit
7ff635c8eb
@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* Fixes a problem with the SQL Adapter which was resulting in IDENTITY_INSERT not being set to ON when it should be #1104 [adelle]
|
||||
|
||||
* Added the option to specify the acceptance string in validates_acceptance_of #1106 [caleb@aei-tech.com]
|
||||
|
||||
* Added acts_as_nested_set #1000 [wschenk]. Introduction:
|
||||
|
@ -203,7 +203,6 @@ def insert(sql, name = nil, pk = nil, id_value = nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
log(sql, name, @connection) do |conn|
|
||||
conn.execute(sql)
|
||||
select_one("SELECT @@IDENTITY AS Ident")["Ident"]
|
||||
@ -362,7 +361,7 @@ def get_identity_column(table_name)
|
||||
end
|
||||
|
||||
def query_contains_identity_column(sql, col)
|
||||
return sql =~ /[\(\.\,]\s*#{col}/
|
||||
return sql =~ /[\[.,]\s*#{col}/
|
||||
end
|
||||
|
||||
def get_order_by(sql)
|
||||
|
Loading…
Reference in New Issue
Block a user