-->
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: Problem with session.merge()
PostPosted: Thu Sep 11, 2008 11:43 am 
Newbie

Joined: Thu Sep 11, 2008 11:14 am
Posts: 1
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:3.2.5.ga

Mapping documents:

Code:
new HibernateCallback(){

public Object doInHibernate(Session session) {
try {
IAutoQuote autoQuote = (IAutoQuote)session.merge(quote);
session.flush();
return autoQuote;
} catch (HibernateException e) {
log.error(e);
throw new LogicExecutionException(e);
}

Full stack trace of any exception that occurs:
After calling the above code, when try to use autoQuote object. I get lazyInitilizationException(), Every time I get at different child in autoQuote object.

AutoQuote tree is very large.

Database : Oracel

I'm posting here for first time, please tell me if you need more information


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 12, 2008 6:17 pm 
Expert
Expert

Joined: Mon Nov 26, 2007 2:29 pm
Posts: 443
Is it a web application or some standalone code?
If it is a web application, you need to make sure that your Hibernate session is being kept alive.

_________________
Gonzalo Díaz


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.