Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.0.3
Name and version of the database you are using:
Oracle 9i
The generated SQL (show_sql=true):
Hi
I am using Hibernate for quite a few months. Can anybody tell me about session.merge(Object);
I have tested in a table with 4 columns.
As for as i understood session.merge() issue an select statement and then an update statement.
I used this session.merge() to merge in an table, but actually it didn't merge but instead it has updated the value.
For eg) consider table as Item
Column : Item_id Item_name Item_value item_price
values
1) 1 computer 5 5000
2) 2 system 2 4000
In this case if i set the item_id and item_name and leave the other and call the session.merge() the result is
Column : Item_id Item_name Item_value item_price
values
1) 1 computer 0 0
2) 2 system 2 4000
This result should come only for session.update(). Is there any problem with session.merge()
I want to use this in my application. I am just giving u an example.
Waiting for your reply
Regards
Ramnath