Quantcast
Channel: JPA EntityManager: Why use persist() over merge()? - Stack Overflow
Viewing all articles
Browse latest Browse all 17

Answer by Ioannis Deligiannis for JPA EntityManager: Why use persist() over merge()?

$
0
0

Going through the answers there are some details missing regarding `Cascade' and id generation. See question

Also, it is worth mentioning that you can have separate Cascade annotations for merging and persisting: Cascade.MERGE and Cascade.PERSIST which will be treated according to the used method.

The spec is your friend ;)


Viewing all articles
Browse latest Browse all 17

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>