No row with the given identifier exists on Refresh [message #90152] |
Tue, 17 July 2007 15:04 |
Simon Bernard Messages: 345 Registered: July 2009 |
Senior Member |
|
|
Hello,
We have 2 clients A and B which handle an object go1 (GraphicalObject).
go1 have a lazy list of objects which contains an object a2
(AbstractAnnotation).
<class entity-name="GraphicalObject" abstract="false" lazy="false"
discriminator-value="GraphicalObject" table="`graphicalobject`">
[...]
<list name="annotations" lazy="true" cascade="all,delete-orphan">
<key update="true">
<column name="`abstractannotation_graphicalobject_e_id`"
not-null="false" unique="false"/>
</key>
<list-index column="`graphicalobject_annotations_idx`"/>
<one-to-many entity-name="AbstractAnnotation"/>
</list>
</class>
The first client A removes a2 from the database.
It notifies B by JMS about this removing.
B tries to refresh its model by using the refresh method :
....getResource().getSession().refresh(go1);
but we have an exception when refreshing :
org.hibernate.UnresolvableObjectException: No row with the given
identifier exists: [Annotation#950273]
at
org.hibernate.UnresolvableObjectException.throwIfNull(Unreso lvableObjectException.java:42)
at
org.hibernate.event.def.DefaultRefreshEventListener.onRefres h(DefaultRefreshEventListener.java:126)
at org.hibernate.impl.SessionImpl.fireRefresh(SessionImpl.java: 911)
at org.hibernate.impl.SessionImpl.refresh(SessionImpl.java:894)
it seems that it can't refresh the deleted object.
How can I refresh go1 on the client B ?
|
|
|
Powered by
FUDForum. Page generated in 0.03166 seconds