[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6367) Calling PersistenceSet.clear() prevents adding elements to it in the same session

Gabriel Axel (JIRA) noreply at atlassian.com
Sat Jun 25 08:32:54 EDT 2011


Calling PersistenceSet.clear() prevents adding elements to it in the same session
---------------------------------------------------------------------------------

                 Key: HHH-6367
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6367
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.6.5
            Reporter: Gabriel Axel


I have an entity that contains a Set annotated with @ElementCollection . When I try to clear the set and after that add new elements in the same session, only the clear works and the added elements are not persisted (matching rows are not added to the table). My workaround is instead of calling Set.clear() , to assign a new HashSet to it, and then adding new elements works fine.

The same entity is also indexed with Hibernate Search, and while this bug happens with the database, Hibernate Search reindexes the collection properly (though the index does not match the database).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list