Commit 2819f03a authored by Viacheslav Pavlov's avatar Viacheslav Pavlov

Fixed generating of `NULL` filter predicate

 -fixed case if model property is `Set`
 -fixed for '.' separated paths
parent 3b9b04ad
......@@ -178,7 +178,7 @@ public abstract class BasicModelFilter<T extends BasicModelFilter<T, R>, R exten
}
clazzToCheck = field.getType();
}
return pathBuilder;
return pathBuilder.getSimple(nullProp, clazzToCheck);
} else {
final Field prop = clazz.getField(nullProp);
if (SimpleExpression.class.isAssignableFrom(prop.getType())) {
......@@ -199,9 +199,9 @@ public abstract class BasicModelFilter<T extends BasicModelFilter<T, R>, R exten
Field result = field.getType().getField(nullProp);
PathBuilder<?> pathBuilder = new PathBuilder<>(instance.getType(), instance.getMetadata());
if (CollectionPathBase.class.isAssignableFrom(result.getType())) {
return pathBuilder.get(field.getName()).getSet(nullProp, result.getDeclaringClass());
return pathBuilder.getSet(nullProp, result.getDeclaringClass());
}
return pathBuilder.get(field.getName()).getSimple(nullProp, result.getDeclaringClass());
return pathBuilder.getSimple(nullProp, result.getDeclaringClass());
} catch (NoSuchFieldException e1) {
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment