RepoDB
RepoDB copied to clipboard
Bug: BulkInsert returns wrong rows affected result
I am using sql server. When I try to Bulk Insert on a table and there is a unique index (not Primary Key) and the index has IGNORE_DUP_KEY = ON and I try to insert duplicate entries then it should return zero (0) rows affected, but instead it returns the count of the collection.
Am I missing something?
We have never tried this scenario yet, but if the data you had bulk-inserted in the database is saved in the table as duplicated values, then the result of the number of rows are correct. Unless of course if the data in the database table is merged automatically by SQL Server, which in this case, the ORM is purely disconnected from this behavior.