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.  [ 2 posts ] 
Author Message
 Post subject: A Simple Question on Refresh()
PostPosted: Mon Jul 14, 2008 4:51 pm 
Newbie

Joined: Fri Jun 20, 2008 2:16 pm
Posts: 6
Hello All,
I am using Hibernate 3.2.6

So I have a Container with a collection of Items.

The user retreives his Items from database on restarting an old conversation. (session-per-conversation approach)

In the process he adds more Items, which are transient.

Now When I call session.refresh(Container container)
it gives an UnresolvableObjectException as it also tries to refresh some of the transient Items.

How Can I tell Hibernate not to refresh transient instances to avoid exception!
OR
What could be an Alternative Approach (think in terms of 10000s of Items)

Thanks much

kashyup


Top
 Profile  
 
 Post subject: No way
PostPosted: Wed Aug 06, 2008 7:54 pm 
Newbie

Joined: Fri Jun 20, 2008 2:16 pm
Posts: 6
Well there is no way to tell Hibernate not to refresh transient instances.

If you are refreshing an ojbect which has a collection of transient and persistent instances then calling refresh on that object will result in an exception.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.