|
Hmm... what if the collection is deleted but the owning entity (in this case "Ownee") is not?
Presumably the re-index of Ownee would be skipped, and then the resource in the index would be out of sync with the DB, since in the DB the collection was deleted but it is still referenced from the index. Yes, but most of the times there will be another event (as is the case in the test you provided). In any case, the current state is better in terms of not raising the exception. Note, that this event was added by Hibernate and they can't even always know what is the owning entity of the collection.
We can have a better handling if we add special handling for this in the Collection converter and check for specific Hibernate collection and ignore this collection (as if it is null) in such cases. Will see if this can be done as well. I am the original reporter. Happy to see the issue is somehow fixed - I am still a bit worried by the out-of-sync problem, but in my case I think it won't happen, since the Ownee will always be deleted (Shay seems to be saying that in this case another event will be thrown that will correctly process the reindexing). Would still be nice to have the better handling mentionned can be implemented.
Is the (current) fix in 2.1 GA ?
Yes, the mid term fix has been applied so atleast the NPE won't break everything.
|
I think this should be ok for now, what do you think?