This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Updating values using Hibernate and struts

 
Sham Grandhe
Ranch Hand
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
presently iam working on struts and hibernate, on a project and iam new to this. i have a problem with the update query.
I have around 15 values in my table and when iam trying to update someof then, other values a being to null in the data base.

UserProfile updateUser = new UserProfile();
updateUser.setUserId(userId);
updateUser.setUserFirstName(updateForm.getFirstname());
updateUser.setUserLastName(updateForm.getLastname());
updateUser.setUserAddress1(updateForm.getAddress1());
updateUser.setUserAddress2(updateForm.getAddress2());
updateUser.setUserAddress3(updateForm.getAddress3());
updateUser.setUserPostcode(updateForm.getPostcode());
updateUser.setUserEmail(updateForm.getEmail());
updateUser.setUserPhone(updateForm.getPhone());
updateUser.setUserJobTitle(updateForm.getJobtitle());
updateUser.setUserTimezone(updateForm.getTimezone());
updateUser.setUserStatus("A");
session.update(updateUser);
transaction.commit();

there are a couple odd that ive not set. since i dont want to change them. plz do help me with some guide lines.

thanking you

regards
shyam
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic