What is the usage of Session.Merge method in NHibernate?
Asked Answered
A

1

5

What is the usage of Session.Merge method in NHibernate?

When can we use of this method?

Aecium answered 18/6, 2011 at 15:2 Comment(1)
Possible duplicate of NHibernate - Difference between session.Merge and session.SaveOrUpdate?Kipton
R
7

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.

Riding answered 18/6, 2011 at 15:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.