Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSL Batch Insert does not work with flag useBulkCopyForBatchInsert on SQL Server #1447

Closed
david-terk opened this issue Feb 1, 2022 · 1 comment

Comments

@david-terk
Copy link

Batch insertion will not work if flag useBulkCopyForBatchInsert=true is set on SQL Server.

  1. Create a table with a non auto incrementing primary key.
  2. Ensure that the types meet the requirements of the Bulk Copy API see here. Ensure at least one type has a non nullable field.
  3. Setup DSL and perform a batch insert.

Transaction will fail with message that column cannot be null. Set useBulkCopyForBatchInsert=false and repeat. There will be no issue.

@bog-walk
Copy link
Member

@david-terk I was able to reproduce the exception and this seems to be a known problem with the mssql-jdbc driver and column order (differs between create and insert statement).

This has been fixed now and running tests (with your above specs) using at least version 12.3.0.jre8-preview resolved the exception on my end.

Please consider updating your SQL Server driver dependency and checking that it works for you too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants