mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1753 - Tidy for Issue with using the Formula-Properties
This commit is contained in:
@@ -265,9 +265,8 @@ class CQueryBuilder {
|
||||
if (!countDistinct) {
|
||||
// minimise select clause for standard count
|
||||
if (manyWhereJoins.isFormulaWithJoin()) {
|
||||
// FIXME: we join the strings here and on the other side we split them again
|
||||
// this is not yet optimal
|
||||
query.select(String.join(",",manyWhereJoins.getFormulaJoinProperties()));
|
||||
// Note that this is not yet optimal (split and join)
|
||||
query.select(String.join(",", manyWhereJoins.getFormulaJoinProperties()));
|
||||
} else {
|
||||
query.setSelectId();
|
||||
}
|
||||
|
||||
@@ -299,8 +299,7 @@ public final class SqlTreeBuilder {
|
||||
if (manyWhereJoins.isFormulaWithJoin()) {
|
||||
for (String property: manyWhereJoins.getFormulaJoinProperties()) {
|
||||
STreeProperty beanProperty = desc.findPropertyFromPath(property);
|
||||
SqlTreeNodeFormulaWhereJoin nodeJoin = new SqlTreeNodeFormulaWhereJoin(beanProperty, SqlJoinType.OUTER);
|
||||
myJoinList.add(nodeJoin);
|
||||
myJoinList.add(new SqlTreeNodeFormulaWhereJoin(beanProperty, SqlJoinType.OUTER));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,18 +67,15 @@ class SqlTreeNodeFormulaWhereJoin implements SqlTreeNode {
|
||||
*/
|
||||
@Override
|
||||
public void appendFrom(DbSqlContext ctx, SqlJoinType currentJoinType) {
|
||||
|
||||
// always use the join type as per this many where join
|
||||
// (OUTER for disjunction and otherwise INNER)
|
||||
nodeBeanProp.appendFrom(ctx, manyJoinType);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void dependentTables(Set<String> tables) {
|
||||
//FIXME: we cannot easily determine the dependent tables, this would require an enhancement
|
||||
//of the @Formula(dependentTables=...) annotation
|
||||
// FIXME: we cannot easily determine the dependent tables this would require an enhancement
|
||||
// of the @Formula(dependentTables=...) annotation
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user