Skip to content

Commit

Permalink
Fix nested projections with nested star
Browse files Browse the repository at this point in the history
Resolves: #8662
  • Loading branch information
luigidellaquila committed Nov 16, 2018
1 parent 50a5366 commit 9656bea
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
public class ONestedProjection extends SimpleNode {
protected List<ONestedProjectionItem> includeItems = new ArrayList<>();
protected List<ONestedProjectionItem> excludeItems = new ArrayList<>();
protected ONestedProjectionItem starItem;
private OInteger recursion; //not used for now
protected ONestedProjectionItem starItem;
private OInteger recursion; //not used for now

public ONestedProjection(int id) {
super(id);
Expand Down Expand Up @@ -96,6 +96,9 @@ private boolean isExclude(String propertyName) {
}

private Object tryExpand(OExpression rootExpr, String propName, Object propValue, OCommandContext ctx, int recursion) {
if (this.starItem != null && starItem.expansion != null) {
return starItem.expand(rootExpr, propName, propValue, ctx, recursion);
}
for (ONestedProjectionItem item : includeItems) {
if (item.matches(propName) && item.expansion != null) {
return item.expand(rootExpr, propName, propValue, ctx, recursion);
Expand Down

0 comments on commit 9656bea

Please sign in to comment.