JPA vs Hibernate : The difference between save, persist, merge and update

JPA vs Hibernate : The difference between save, persist, merge and update

97.973 Lượt nghe
JPA vs Hibernate : The difference between save, persist, merge and update
JPA and Hibernate provide different methods to persist new and to update existing entities. You can choose between JPA’s persist and merge and Hibernate’s save and update methods. It seems like there are 2 pairs of 2 methods that do the same. You can use the methods persist and save to store a new entity and the methods merge and update to store the changes of a detached entity in the database. That’s why a lot of developers are wondering which of these methods they should use. Let’s take a closer look at the details and small differences of these methods. If you like this video, please give me your thumbs up and share it with your friends and co-workers. Like my channel? Subscribe! ➜ http://bit.ly/2cUsid8 Join the free Member Library: https://goo.gl/dtyIIC Read the accompanying post: https://www.thoughts-on-java.org/persist-save-merge-saveorupdate-whats-difference-one-use Want to connect with me? Blog: http://www.thoughts-on-java.org/ Twitter: https://twitter.com/thjanssen123 Facebook: https://www.facebook.com/thoughtsonjava