Open
Description
Trying bulk insert on a table with a unique constraint
await dbContext.BulkInsertAsync(collection,
new BulkConfig { ConflictOption = ConflictOption.Ignore },
cancellationToken: stoppingToken);
getting error
duplicate key value violates unique constraint "ix_foo"
It seems that the conflict option is only implemented for mysql: https://github.com/search?q=repo%3Aborisdj%2FEFCore.BulkExtensions+conflictoption&type=code
Postgres has an "ON CONFLICT DO (NOTHING|UPDATE)" clause: https://www.postgresql.org/docs/current/sql-insert.html
Metadata
Metadata
Assignees
Labels
No labels