[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2305) refresh throws exception when database has been altered with a delete

Sheldon Warkentin (JIRA) noreply at atlassian.com
Wed Jan 7 20:18:39 EST 2009


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

Sheldon Warkentin commented on HHH-2305:
----------------------------------------

We are also running into the exact same issue.  

Is there any status update for this issue?

> refresh throws exception when database has been altered with a delete
> ---------------------------------------------------------------------
>
>                 Key: HHH-2305
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2305
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.1
>         Environment: Hibernate 3.2.1, Oracle 9.2
>            Reporter: Markus Heiden
>         Attachments: hibernate.zip
>
>
> First I save an entity with a collection of cascading entities in it and flush. Then I delete these cascaded entities with a sql query. When I now do a refresh on the entity an exception is thrown, because the cascaded entities couldn't be found in the database. I expected these entities to be deleted from the (in memory) collection of the entity instead.
> Test case is attached. Stacktrace of test case:
> Hibernate: select c0_.id as id2_0_, c0_.c as c2_0_ from C c0_ where c0_.id=?
> org.hibernate.UnresolvableObjectException: No row with the given identifier exists: [hibernate.refresh.C#30003]
> 	at org.hibernate.UnresolvableObjectException.throwIfNull(UnresolvableObjectException.java:42)
> 	at org.hibernate.event.def.DefaultRefreshEventListener.onRefresh(DefaultRefreshEventListener.java:126)
> 	at org.hibernate.impl.SessionImpl.fireRefresh(SessionImpl.java:911)
> 	at org.hibernate.impl.SessionImpl.refresh(SessionImpl.java:894)
> 	at org.hibernate.engine.CascadingAction$4.cascade(CascadingAction.java:169)
> 	at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
> 	at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:216)
> 	at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
> 	at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:296)
> 	at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)
> 	at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)
> 	at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
> 	at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
> 	at org.hibernate.event.def.DefaultRefreshEventListener.onRefresh(DefaultRefreshEventListener.java:99)
> 	at org.hibernate.impl.SessionImpl.fireRefresh(SessionImpl.java:911)
> 	at org.hibernate.impl.SessionImpl.refresh(SessionImpl.java:894)
> 	at org.hibernate.engine.CascadingAction$4.cascade(CascadingAction.java:169)
> 	at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
> 	at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:216)
> 	at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
> 	at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:296)
> 	at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)
> 	at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)
> 	at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
> 	at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
> 	at org.hibernate.event.def.DefaultRefreshEventListener.onRefresh(DefaultRefreshEventListener.java:99)
> 	at org.hibernate.event.def.DefaultRefreshEventListener.onRefresh(DefaultRefreshEventListener.java:39)
> 	at org.hibernate.impl.SessionImpl.fireRefresh(SessionImpl.java:902)
> 	at org.hibernate.impl.SessionImpl.refresh(SessionImpl.java:886)
> 	at hibernate.refresh.Test.main(Test.java:46)

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