Can session.save method in hibernate be used for updating the entity -


in hibernate, if use session.save method instead of session.update updating entity.what behavior like.i asked question colleague of mine , totally short of answers.

the documentation suggest save assign id entity (or use current id if present) , try insert in database.

therefore, if have constraints of uniqueness on table, end hibernate exception.

if not, have twice entry.

(i think)


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -