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.  [ 4 posts ] 
Author Message
 Post subject: Refresh saved objects formula
PostPosted: Fri Jul 07, 2006 9:31 am 
Newbie

Joined: Wed Mar 15, 2006 5:44 am
Posts: 4
Hi,

I have an entity object that has a property-formula mapping. When the object is persisted (first time), the formula is not calculated (object is not refreshed).

Anyone knows how I can enable this?

Ofcourse I could evict the object and load it again but I don't like this approach. It also gives problems when you want to persist again (nonuniqueobjectexception).

If not possible does anyone know how to disable session caching for one specific entity or just disable the entire session cache?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 4:16 pm 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
Did you try the session.refresh() method on this instance ?

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 10, 2006 4:46 am 
Newbie

Joined: Wed Mar 15, 2006 5:44 am
Posts: 4
Life can be easy...

Why didn't I find this after a two-hour browsing sessin in the NHibernate documentation?

Thanks anyway.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 10, 2006 5:10 am 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
Gosh, I just realized I posted in the NHibernate Forum :-D. I don't know C# or .Net at all :-).

I'm using Java and Hibernate. So your problem seemed to be an Hibernate one ...

Anyway, if my answer helped you, please rate it :).

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


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