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

BulkRead with ReplaceReadEntities=True Not Working as Expected When No Matches Found #1637

Open
champin4 opened this issue Dec 13, 2024 · 2 comments
Labels

Comments

@champin4
Copy link

champin4 commented Dec 13, 2024

Long story short is I would expect if ReplaceReadEntities = true for the BulkConfig options for a .BulkRead(Async) that I would end up with an empty list if there were no matches on the database. Instead, we end up with the original list that is not updated similar to if we did not have ReplaceReadEntities.

Right now we are having to rely on a specific field we are 99% sure should never be a default value to validate if the entities were actually replaced, however this is not optimal and would not work for all use cases.

This is with a SQL Server database if that matters.

@borisdj
Copy link
Owner

borisdj commented Dec 15, 2024

So you would like for list to be cleared if none are matched?

@champin4
Copy link
Author

Yes that seems to be in line with what I see happening when there are matches and ReplaceReadEntities = true. An empty list would signify there were no matches just like a N sized list indicates there were N matches

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

No branches or pull requests

2 participants