-->
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.  [ 1 post ] 
Author Message
 Post subject: Session.refresh() - entity name
PostPosted: Tue Jun 23, 2009 7:27 am 
Newbie

Joined: Tue Jun 23, 2009 7:19 am
Posts: 1
Hello

The org.hibernate.Session interface takes an "entityName" argument for most operations such as save, update or delete. However the refresh() method does not do so, which gives be an org.hibernate.MappingException "Unkown entity" when I use it.

I need to refresh an entity after doing some SQL batch updates. I guess using Session.flush() followed by Session.clear() or Session.evict() is a workaround, but I feel the Session API is inconsistent in not providing a refresh method that takes an entityName argument.

Or is there some other explanation? I tried to search the Hibernate issue DB but could not find a bug for this. Let me know if I should file one (as a feature request).

Thanks

Trygve Hardersen
Jotta AS


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

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.