0

What makes NHibernate engine determine whether the command is an update or insert?

The command is similar for both update and insert.

allan
  • 276
  • 3
  • 10
  • possible duplicate of [SaveOrUpdate Vs Update and Save in NHibernate](http://stackoverflow.com/questions/1150854/saveorupdate-vs-update-and-save-in-nhibernate) – Jamie Ide Mar 28 '12 at 15:57

1 Answers1

1

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. "

Nikolay
  • 3,658
  • 1
  • 24
  • 25