Skip to content

Commit

Permalink
指定transformIn之后不再按照dataType进行类型转换
Browse files Browse the repository at this point in the history
  • Loading branch information
entropy-cloud committed Aug 1, 2024
1 parent a5b6f6b commit 755b93e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions nop-biz/src/main/java/io/nop/biz/crud/ObjMetaBasedValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -378,14 +378,11 @@ private boolean isRefPrimary(IBizObject bizObject, String propName) {

private Object convertValue(IObjPropMeta propMeta, Object value, Map<String, Object> data,
Map<String, Object> ret) {
// IEvalAction action = propMeta.getTransformIn();
// if (action != null) {
// IEvalScope scope = XLang.newEvalScope();
// scope.setLocalValue(null, BizConstants.VAR_DATA, data);
// scope.setLocalValue(null, BizConstants.VAR_TRNAS_DATA, ret);
// scope.setLocalValue(null, BizConstants.VAR_VALUE, value);
// value = action.invoke(scope);
// }
// 如果指定了transformIn,则以它的转换结果为准,不再需要根据类型进行转化。transformIn的结果类型也不一定和dataType一致
IEvalAction action = propMeta.getTransformIn();
if (action != null) {
return value;
}

StdDataType type = propMeta.getStdDataType();
if (type == null)
Expand Down

0 comments on commit 755b93e

Please sign in to comment.