Open sys-64738 opened 9 years ago
thanks @sys-64738 , i will take a look today
@sys-64738 can you please provide the version of ActiveRecord you use, your gemfile, I am trying to reproduce.
Thank you for looking into it. I have activerecord (3.2.22) and activerecord-sqlserver-adapter (3.2.13).
I'm getting an error from my SQL Server database ("Cannot update identity column 'id'") when running "sneaky_save!" for updating an existing record because the SQL UPDATE statement also sets the "id" column (though it was actually not changed).
I see that "sneaky_create" has some code for handling primary key columns, but sneaky_update hasn't.
Shouldn't it actually just update only the columns from "changed_attributes", rather then all attributes? And then also reset changed_attributes to an empty hash afterwards?