Reputation: 22930
What is the usage of Session.Merge method in NHibernate?
When can we use of this method?
Upvotes: 5
Views: 5445
Reputation: 13096
Try look here:
NHibernate - Difference between session.Merge and session.SaveOrUpdate?
from the above post:
You should use Merge() if you are trying to update objects that were at one point detached from the session, especially if there might be persistent instances of those objects currently associated with the session. Otherwise, using SaveOrUpdate() in that case would result in an exception.
Upvotes: 7