#1425 - Stateless update with OneToMany with SoftDelete and deleteMissingChildren = true ... does a hard delete

This commit is contained in:
rob bygrave
2018-06-14 16:09:45 +12:00
parent e21839de91
commit 81c6d4601d
13 changed files with 259 additions and 75 deletions
@@ -0,0 +1,38 @@
package io.ebeaninternal.server.persist;
import io.ebeaninternal.server.core.PersistRequest;
/**
* The delete mode of the persistence request. The mode is determined at the beginning of the request
* as being a Hard or Soft delete based and then the mode is used for that request and any cascading.
*/
public enum DeleteMode {
/**
* Soft/logical delete.
*/
SOFT(PersistRequest.Type.DELETE_SOFT, false),
/**
* Hard/permanent delete.
*/
HARD(PersistRequest.Type.DELETE_PERMANENT, true);
private boolean hard;
private PersistRequest.Type persistType;
DeleteMode(PersistRequest.Type persistType, boolean hard) {
this.persistType = persistType;
this.hard = hard;
}
public PersistRequest.Type persistType() {
return persistType;
}
public boolean isHard() {
return hard;
}
}