diff options
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb index fecc6a7e1c..ec85c88c61 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -236,7 +236,7 @@ module ActiveRecord end log(sql, name) do @connection.execute(sql) - select_one("SELECT @@IDENTITY AS Ident")["Ident"] + id_value || select_one("SELECT @@IDENTITY AS Ident")["Ident"] end ensure if ii_enabled |