When using Session.SaveOrUpdate(myEntity); How does NHibernate decide how to insert a new record or update an existing one?
I'm having trouble saving one object in an S # arp project. It is retrieved from the repository, then stored in session state for several web requests, and then saved back to the database with one property changed (not S # arp [DomainSignature] ).
At runtime, I compared the object that should be saved with the recently obtained version directly from the database using the Equals() method and returns true. However, the object still finishes creating a new row in the database.
Elsewhere in the application, this works fine, but I am hoping for a pointer to how NHib works on this.
source share