add @Transient to AbstractPersistableCustom isNew()
see https://jira.spring.io/browse/DATAJPA-622 Even though we don't use Hibernate, copying this annotation from the original class in Spring Data seems prudent - just in case. It should not cause any harm or side effects on OpenJPA.
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
ae4117052b
commit
dccea1d65e
+2
@@ -23,6 +23,7 @@ import javax.persistence.GeneratedValue;
|
|||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.MappedSuperclass;
|
import javax.persistence.MappedSuperclass;
|
||||||
|
import javax.persistence.Transient;
|
||||||
import org.springframework.data.domain.Persistable;
|
import org.springframework.data.domain.Persistable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,6 +56,7 @@ public abstract class AbstractPersistableCustom<PK extends Serializable> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transient // DATAJPA-622
|
||||||
public boolean isNew() {
|
public boolean isNew() {
|
||||||
return null == this.id;
|
return null == this.id;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user