Browse Source
Previously, we only checked the version attribute's value against null, which effectively invalidly reported a new entity being non-new in case it used primitive types for the version attribute (as it has a default value then). We now explicitly check for primitive version property types and consider default values to indicate new state.1.6.x
4 changed files with 34 additions and 1 deletions
@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
|
||||
package org.springframework.data.jpa.domain.sample; |
||||
|
||||
import javax.persistence.Entity; |
||||
import javax.persistence.Id; |
||||
import javax.persistence.Version; |
||||
|
||||
@Entity |
||||
public class PrimitiveVersionProperty { |
||||
|
||||
@Id Long id; |
||||
@Version long version; |
||||
} |
||||
Loading…
Reference in new issue