Sfoglia il codice sorgente

修复树结构无法验证问题

zhou-hao 4 anni fa
parent
commit
cafc138d3d

+ 1 - 0
hsweb-commons/hsweb-commons-api/src/main/java/org/hswebframework/web/api/crud/entity/TreeSupportEntity.java

@@ -52,6 +52,7 @@ public interface TreeSupportEntity<PK> extends Entity {
 
     @Override
     default void tryValidate(Class<?>... groups) {
+        Entity.super.tryValidate(groups);
         if (getId() != null && Objects.equals(getId(), getParentId())) {
             throw new ValidationException("parentId", "子节点ID不能与父节点ID相同");
         }