-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Is cached collection update when deleting object?
PostPosted: Mon Apr 11, 2005 9:45 am 
Beginner
Beginner

Joined: Sun Sep 19, 2004 5:02 pm
Posts: 28
Location: Poland
I have one-to-many bidirectional association (A*<->B).

A and B and "As" collection in B are cached (EHcache read-write)

In my tansaction I call session.delete(A).

Can hibernate automaticaly update cached-collection "As"?

_________________
Lmichasz


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2005 4:23 pm 
Beginner
Beginner

Joined: Fri Mar 26, 2004 8:19 am
Posts: 49
I would increase the logging level of the ehcache log4j appender, and you can see cache hits/misses to diagnose this.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 26, 2005 9:59 am 
Beginner
Beginner

Joined: Sun Sep 19, 2004 5:02 pm
Posts: 28
Location: Poland
I've checked this problem.
Hibernate doesn't automaticaly remove deleted objects from collections.
In simple cases (deleting only one object) I can do it on my own but I use cascade delete in many places.
Aftere delete when I try tu use collection (cached erlier) and when I attempt to get properties of deleted object I get this exception:

net.sf.hibernate.ObjectNotFoundException

How can I solve this problem?

_________________
Lmichasz


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.