Closed felzend closed 1 year ago
The adapter doesn't support upsert
as Microsoft SQL Server doesn't natively support it either. There were investigations in https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues/859 to see if upsert
could be supported using MERGE
but they have been unsuccessful.
Is there no way to implement this in SQL Server?
upsert
is a valuable feature and is required for supporting Solid Cache (See #1122)
Issue
Trying to use an upsert operation on my model, but it's showing an error telling this adapter has no implementation for that.
Expected behavior
Upsert operation working with no exceptions.
Actual behavior
Throwing an exception:
ActiveRecord::ConnectionAdapters::SQLServerAdapter does not support upsert
raise ArgumentError, "#{connection.class} does not support upsert"
How to reproduce
Simply calling
Details
7.0.4.3
7.0.1.0
2.1.5
SQL SERVER 16.0.4003.1 - Developer Edition