Reputation: 276
What makes NHibernate engine determine whether the command is an update or insert?
The command is similar for both update and insert.
Upvotes: 0
Views: 87
Reputation: 3828
From official docs: "NHibernate distinguishes "new" (unsaved) instances from "existing" (saved or loaded in a previous session) instances by the value of their identifier (or version, or timestamp) property. The unsaved-value attribute of the (or , or ) mapping specifies which values should be interpreted as representing a "new" instance. "
Upvotes: 1