-->
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: session.update
PostPosted: Mon Jul 16, 2007 12:03 am 
Newbie

Joined: Wed Jun 06, 2007 5:32 am
Posts: 10
Hi
Am populating the model using Criteria query and am modifying the model as i want and am updating using session.update.It is not throwing any exception in console and the hibernet query also not getting printed in console


here my code;
Criteria cr = session.createCriteria(GDCRateModel.class);
List rateList = cr.list();
GDCRateModel gdcrateModel = null; for(int i=0; i<rateList.size(); i++){
gdcrateModel = (GDCRateModel)rateList.get(i);
here am modifying using gdcrateModel.settervalue("set")

session.update(gdcrateModel);
session.flush();
}
i have tried seesion,beginTransaction also. But it did't work it out

Am using hibernate2 and wsad5.0


any idea abt these isse.??


Thanks
Giri


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 16, 2007 1:24 am 
Regular
Regular

Joined: Wed Jun 20, 2007 1:53 am
Posts: 75
Giri,
Have you enabled show_sql='true' in hibernate configuration file to SQL get printed in console?

Use transaction and commit method in Transaction object to store/update the values in DB.

Regards
Shanmugam.N

Dont forget to rate, if helps.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 16, 2007 1:28 am 
Newbie

Joined: Wed Jun 06, 2007 5:32 am
Posts: 10
Hi,
That is enabled only. since it is not printing any msg in console. insted of update am tried delete and insert, it is worked. i dunno the exact reason.

any idea.?

Thanks
Giri


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.