[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3662) Merging read-only entities causes AssertionError("Merged entity does not have status set to MANAGED...")

Daniela Akagui (JIRA) noreply at atlassian.com
Fri Feb 6 06:45:38 EST 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32336#action_32336 ] 

Daniela Akagui commented on HHH-3662:
-------------------------------------

I had the same problem, so I did a runnable test case.
In my test I have 3 classes : EventAction , EventType and Patient. Patient has a collection of EventAction , EventAction has EvenType and EventType and EventAction are annotated with @org.hibernate.annotations.Entity(mutable = false) , the error occurs with @Immutable too.

The error only occurs when my relashionship from Patient to EventAction is OneToMany or ManyToMany with Cascace.ALL.

I'm attaching my test project and a dump with my tables. I did the test with oracle database xe.

For running the dump do : 

imp  file=%DIR%/DUMP_HIBERNATE_20090206.dmp userid=DBA...... at xe fromuser=test touser=anyuser buffer=30720 commit=no grants=yes ignore=yes indexes=yes rows=yes show=no constraints=yes                                                        

> Merging read-only entities causes AssertionError("Merged entity does not have status set to MANAGED...")
> --------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-3662
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3662
>             Project: Hibernate Core
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>         Environment: Windows XP
>            Reporter: jpk
>
> What worked for me in 3.2.6 now doesn't: merging read-only entities.  The following error now occurs when attempting to merge an entity:
> org.hibernate.AssertionFailure: Merged entity does not have status set to MANAGED; EntityEntry[com.tll.model.impl.AccountHistory#71794688](READ_ONLY) status=READ_ONLY
> Note this entity class of mine has the @Immutable annotation and removing it prevents this AssertionError from occurring.

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