Skip to content
This repository
Browse code

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
  • Loading branch information...
commit 7ff635c8eb84253da909c55c0b01ae38fe17d4a0 1 parent 4407332
David Heinemeier Hansson authored April 17, 2005
2  activerecord/CHANGELOG
... ...
@@ -1,5 +1,7 @@
1 1
 *SVN*
2 2
 
  3
+* Fixes a problem with the SQL Adapter which was resulting in IDENTITY_INSERT not being set to ON when it should be #1104 [adelle]
  4
+
3 5
 * Added the option to specify the acceptance string in validates_acceptance_of #1106 [caleb@aei-tech.com]
4 6
 
5 7
 * Added acts_as_nested_set #1000 [wschenk]. Introduction:
3  activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb
@@ -203,7 +203,6 @@ def insert(sql, name = nil, pk = nil, id_value = nil)
203 203
               end
204 204
             end
205 205
           end
206  
-
207 206
           log(sql, name, @connection) do |conn|
208 207
             conn.execute(sql)
209 208
             select_one("SELECT @@IDENTITY AS Ident")["Ident"]
@@ -362,7 +361,7 @@ def get_identity_column(table_name)
362 361
         end
363 362
 
364 363
         def query_contains_identity_column(sql, col)
365  
-          return sql =~ /[\(\.\,]\s*#{col}/
  364
+          return sql =~ /[\[.,]\s*#{col}/
366 365
         end
367 366
 
368 367
         def get_order_by(sql)

0 notes on commit 7ff635c

Please sign in to comment.
Something went wrong with that request. Please try again.