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

Error when bulk updating/inserting to SQL Server Temporal Tables #28

Open
Steven-FlexTechs opened this issue Dec 31, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@Steven-FlexTechs
Copy link

(Reference for Temporal Tables: https://docs.microsoft.com/en-us/sql/relational-databases/tables/creating-a-system-versioned-temporal-table?view=sql-server-ver15)

I utilize SQL Server Temporal Tables and my time columns have unique names different than the default SysStartTime and SysEndTime.

The error occurs when trying to update or insert to these columns which is not allowed.
2019-12-31 08_34_27-Window

I believe the solution would be to support configuring column names that need to be ignored in the "BulkUpdateAll" and "BulkInsertAll" methods.

I've been utilizing the solution below to support SQL Server Temporal Tables in EF for years.
https://stackoverflow.com/questions/40742142/entity-framework-not-working-with-temporal-table

@mtanneryd
Copy link
Owner

Thanks for the feedback, much appreciated.

For BulkUpdateAll you can make it work as it is now even though it will be the other way around. Using the update method that takes a BulkUpdateRequest you can specify the columns you want to update. For BulkInsertAll I need to make some changes though and maybe I should add an "ignore-columns-property in the BulkUpdateRequest class.

I'll try to get a fix out as soon as possible. Currently also working on a multi target version that also supports .net core (not EF Core though that will have to wait a bit)

@mtanneryd mtanneryd added the enhancement New feature or request label May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants