Details
Description
When doing bulk UPDATE/DELETE it might be useful to tell the EntityManager to either mark a model instance as "dirty" or even force immediate reload.
So for example:
1) i update all user models -> mark all user model instances as outdated or force reloading all of them at once
2) i update a list of user models and i have the list of ids -> mark a specific list of user model instances as outdated or force reloading of them at once
3) i do various updates, after i am done i want to force reloading of all model instances that are outdated or if a specific type or of a specific list of ids per type
In the same vain I might want to do similar things after bulk deleting.
Furthermore in some cases I might do inserts which could mean that a collection is no longer "valid". imagine for example i insert a new record and i have a hydrated collection over all of the models in the DB.
Since UPDATE and DELETE only allow WHERE clauses i guess it could be possible to pass a query hint that additionally generates a SELECT query and executes it right after the update/delete statement, in combination with HINT_REFRESH.