FIX: @Formula on @ManyToOne produces SQLException ... fix appends missing FROM clause for formula joins #1299

This commit is contained in:
Roland Praml
2018-03-02 11:43:08 +13:00
committed by Rob Bygrave
parent 11e180aa3f
commit 021d57f4b2
5 changed files with 66 additions and 3 deletions
@@ -126,6 +126,10 @@ class SqlTreeNodeExtraJoin implements SqlTreeNode {
joinType = SqlJoinType.OUTER;
}
if (!manyToMany) {
if (assocBeanProperty.isFormula()) {
// add joins for formula beans
assocBeanProperty.appendFrom(ctx, joinType);
}
joinType = assocBeanProperty.addJoin(joinType, prefix, ctx);
}