[hibernate-issues] [Hibernate-JIRA] Created: (HHH-7316) Collection removal actions added by DefaultAutoFlushEventListener.onAutoFlush() are not removed when flush is not needed

Gail Badner (JIRA) noreply at atlassian.com
Thu May 10 20:13:09 EDT 2012


Collection removal actions added by DefaultAutoFlushEventListener.onAutoFlush() are not removed when flush is not needed
------------------------------------------------------------------------------------------------------------------------

                 Key: HHH-7316
                 URL: https://hibernate.onjira.com/browse/HHH-7316
             Project: Hibernate ORM
          Issue Type: Bug
          Components: core
            Reporter: Gail Badner
            Assignee: Gail Badner
             Fix For: 4.1.4


If any collection removal actions are added by DefaultAutoFlushEventListener.onAutoFlush(), they need to be removed if it turns out that flush is not needed (because no updates involve the specified query spaces).

Due to the fix for HHH-6862, the added collection removal actions are no longer removed from the action queue.

As a result, when the session is ultimately flushed, duplicate collection actions will be added to the action queue. The first remove will execute fine, but the CollectionEntry.loadedPersister will be set to null. 

If Envers is used, the second remove action involving the same collection will fail with NullPointerException when EnversPreCollectionRemoveEventListenerImpl.onPreRemoveCollection() calls collectionEntry.getLoadedPersister().isInverse().

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list