aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-04-17 13:59:02 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-04-17 13:59:02 +0000
commit7ff635c8eb84253da909c55c0b01ae38fe17d4a0 (patch)
treefb218916fd90c307a6a29e4ef4ca7c0b2cce8d0a /activerecord
parent44073321a814797888c130ef4deb79b7a6982a4d (diff)
downloadrails-7ff635c8eb84253da909c55c0b01ae38fe17d4a0.tar.gz
rails-7ff635c8eb84253da909c55c0b01ae38fe17d4a0.tar.bz2
rails-7ff635c8eb84253da909c55c0b01ae38fe17d4a0.zip
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
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/CHANGELOG2
-rw-r--r--activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb3
2 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index 6229de9224..ec31dd575f 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -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:
diff --git a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb
index 3c0df411aa..03f5b5ee2b 100644
--- a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb
@@ -203,7 +203,6 @@ module ActiveRecord
end
end
end
-
log(sql, name, @connection) do |conn|
conn.execute(sql)
select_one("SELECT @@IDENTITY AS Ident")["Ident"]
@@ -362,7 +361,7 @@ module ActiveRecord
end
def query_contains_identity_column(sql, col)
- return sql =~ /[\(\.\,]\s*#{col}/
+ return sql =~ /[\[.,]\s*#{col}/
end
def get_order_by(sql)