| Author |
update problem
|
lynn fann
Ranch Hand
Joined: Oct 15, 2006
Posts: 115
|
|
i tried to do the update for records, but the datas are not being update and there are no errors. im using hibnerateUtils.update(oSession,obj); I pass in the session and the Object to be updated. but the datas in the DB does not change. In the console, the update HQL did print out. Im really lost in this. thanks.
|
 |
saranga rao
Ranch Hand
Joined: Apr 24, 2007
Posts: 49
|
|
Hi, Can you give more details related to tables/Codes/database connection/hbm.xml/main? regards Saranga
|
 |
lynn fann
Ranch Hand
Joined: Oct 15, 2006
Posts: 115
|
|
update function: main(): from the console, this line is printed: Hibernate: update CTHREAD set TOPIC_ID=?, MSG_TEXT=?, EMAIL_ADDR=?, SUBMIT_USER_ID=?, CREATED_DATE=?, THREAD_STATUS=?, QUERY_REFERENCE_NO=?, QUERY_STATUS=?, LAST_MODIFY_DATE=?, RESOLUTION_MODE=?, RESOLUTION_STATUS=? where ID=? mapping: [ May 10, 2007: Message edited by: lynn fann ]
|
 |
karthick swami
Greenhorn
Joined: May 14, 2007
Posts: 4
|
|
To save changes to database: A transaction has to be opened for the session. Transaction txn = session.beginTransaction(); session.flush(); txn.commit(); session.close(); Only when transaction.commit is done it will reflect in the DB.
|
 |
lynn fann
Ranch Hand
Joined: Oct 15, 2006
Posts: 115
|
|
|
ok, i try that out. thanks
|
 |
 |
|
|
subject: update problem
|
|
|