-->
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: refresh
PostPosted: Fri Mar 10, 2006 7:23 am 
Beginner
Beginner

Joined: Wed Aug 10, 2005 4:22 am
Posts: 24
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.0

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using: MySql

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


In my application, at some time i want to update my objects by reading the values from database. For this purpose i use the session.refresh function. By this function i get the new values but the object references also changes. but object identity is important for my application. is there any way of doing this (refreshing objects but not references) ?
is there any configuration i can make at the hibernate.cfg.xml to make objects synchronize themselves with the database?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 3:55 am 
Beginner
Beginner

Joined: Wed Aug 10, 2005 4:22 am
Posts: 24
i couldnot find the answer.
please help.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 03, 2006 4:52 pm 
Regular
Regular

Joined: Tue May 04, 2004 6:15 am
Posts: 51
Try using #session.update(Object)

_________________
eu:life
http://www.eulife.gr


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.