Saveorupdate not updating developing a friendship dating
To understand the methods better it is good to understand the different states Hibernate managed entities go through.
The starting point for new entities is the transient state.
NHibernate supports this model by providing the method (cat Id); Cat potential Mate = new Cat(); first Session.
based upon your requirement for persisting object into Database.
Make a one-time purchase, or buy an Office 365 subscription and stay up to date.
How come save Or Update does not work for the save part but does work for the update?
If I use: Or Update(item); it does not work for a save but does for an update.
We generally discourage the use of the two-argument form since it may be used to create primary keys with business meaning.
One of them is Difference between save , save Or Update and persist, which we will see in this Hibernate article.
either INSERT or UPDATE based upon existence of object in database.