-->
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: get() and load() failed after evict()
PostPosted: Fri Aug 27, 2004 1:44 am 
Newbie

Joined: Fri Aug 27, 2004 1:29 am
Posts: 2
After I evict() an object, both Session.get() and load() failed to get it back.
This is the case regardless I have or haven't commited the connection after the save.
Is that a bug or feature?

[b]Hibernate version:[/b] 2.1

[code]

session.save(myObj);

session.connection().commit();
// Same problem regardless it is commited or not

session.evict(myObj);

session.get(myObj.getClass(), myObj.id ); // return null
session.load(myObj.getClass(), myObj.id ); // throws exception

//But can obtain it if I use find or createCriteria
List list = session.createCriteria(myObj.getClass()).add(Expression.eq("id", myObj.id).list();

[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 27, 2004 2:55 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Are you really sure about that?

If so, please produce a very simple test case, and submit to JIRA. TIA


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 27, 2004 2:59 am 
Newbie

Joined: Fri Aug 27, 2004 1:29 am
Posts: 2
Absolutely sure, as I tested it many times.
Will submit it as u suggested


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.