[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-5124) Removing an entity and persisting it again fails

Steve Ebersole (JIRA) noreply at atlassian.com
Thu Jan 5 14:49:11 EST 2012


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole closed HHH-5124.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0.1

> Removing an entity and persisting it again fails
> ------------------------------------------------
>
>                 Key: HHH-5124
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5124
>             Project: Hibernate Core
>          Issue Type: Patch
>          Components: core
>    Affects Versions: 3.3.2, 3.5.1, 4.0.0.Final
>         Environment: Tested with Hibernate 3.3.2, HSQL 1.7.2
>            Reporter: Jesper Steen Møller
>            Assignee: Steve Ebersole
>             Fix For: 4.0.1
>
>         Attachments: HHH-5124.txt, RemoveAndPersistProblem.zip
>
>          Time Spent: 3h 2m
>
> According to the JPA spec section 3.2.1, it should be possible to remove and then (re)persist an entity, but Hibernate will throw an javax.persistence.EntityNotFoundException: deleted entity passed to persist, originating from DefaultPersistEventListener.onPersist, in the 'default'-case of the switch for entityState.
> The code in question is not changed between 3.3.2 and 3.5.1, so it should have the same problem.
> The enclosed test project (Eclipse project format, just add all the usual jars + hsql) demonstrates the problem.
> Also see https://forum.hibernate.org/viewtopic.php?f=1&t=995703&view=previous

--
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