Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java spring crudrepository generate insert instead of update

I have a @Version field in my entity. If there is a @Version field Spring Data will test that value to determine if the entity is new or not. If the @Version field is not a primitive and is null then the entity is considered new.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #spring #crudrepository #generate #insert #update
ADD COMMENT
Topic
Name
5+6 =