gpt4 book ai didi

c# - NHibernate 中 Session.Merge 方法的用法是什么?

转载 作者:太空狗 更新时间:2023-10-29 23:02:44 24 4
gpt4 key购买 nike

NHibernate中Session.Merge方法的用法是什么?

我们什么时候可以使用这个方法?

最佳答案

试试看这里:

NHibernate - Difference between session.Merge and session.SaveOrUpdate?

来自上面的帖子:

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.

关于c# - NHibernate 中 Session.Merge 方法的用法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6396856/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com