#1012 - Filtering on embedded values in a joined table does not produce a sql join (#1013)

This commit is contained in:
OndrejPacay
2017-04-30 22:33:02 +12:00
committed by Rob Bygrave
parent 335c4de109
commit 63def00626
3 changed files with 83 additions and 1 deletions
@@ -181,6 +181,8 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> {
chain = new ElPropertyChainBuilder(true, propName);
}
chain.add(this);
chain.setEmbedded(true);
return chain.add(embProp).build();
}
@@ -19,7 +19,7 @@ public class ElPropertyChainBuilder {
private final List<ElPropertyValue> chain = new ArrayList<>();
private final boolean embedded;
private boolean embedded;
private boolean containsMany;
@@ -61,4 +61,11 @@ public class ElPropertyChainBuilder {
return new ElPropertyChain(containsMany, embedded, expression, chain.toArray(new ElPropertyValue[chain.size()]));
}
/**
* Permits to set whole chain as embedded when the leaf is embedded
* @param embedded
*/
public void setEmbedded(boolean embedded) {
this.embedded = embedded;
}
}