But then the EntityIdentityInsertAction is not consistent with the EntityInsertAction behavior. If the write-through cache population is not intended, because of memory issues, then using a Sequence Generator will do just this.
There are use cases when you want to populate a cache, upon inserting entities. If you have a data import back-end service that does the inserts, you'd like it to cache the entities right from the start, so that the front-end apps don't have to go to the database to fetch the newly inserted entries (we've had this design requirement lately).
I agree that a configuration might solve this issue, but then it should be applied consistently to all identifier generator types.
|