allan
allan

Reputation: 276

What is the difference between update and insert in NHibernate?

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

Answers (1)

Nikolay
Nikolay

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

Related Questions