Ben Hall
2010-Jan-02 17:05 UTC
[Ironruby-core] activerecord mssql adapter - Auto ID support
Hello, Just playing around with ActiveRecord, IR and Sql Server and it seems that it executes scope_identity() as a separate statement, instead of being part of the batch file. As such, the object is never being updated correctly. SQL Profiler shows this: SQL:BatchStarting INSERT INTO [users] ([name], [email]) VALUES(''JimBob'', ''Test at Test.com'') Mono local 57 2010-01-02 17:01:32.640 SQL:BatchStarting exec sp_executesql N''SELECT scope_identity()'' Mono local 57 2010-01-02 17:01:32.657 Any ideas? Anyone got this working? Thanks Ben