[Ironruby-core] activerecord mssql adapter - Auto ID support

Ben Hall ben2004uk at googlemail.com
Sat Jan 2 12:05:34 EST 2010


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
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?



More information about the Ironruby-core mailing list