#607 - bool conversion for and(), or() and not()

This commit is contained in:
Robin Bygrave committed 2016-03-18 16:19:41 +13:00
1 parent 42f65ead47
commit 62f88c9e4f
3 files changed
+5 -4

No files matched your search

@@ -1,6 +1,7 @@
package com.avaje.ebeaninternal.server.expression;
import com.avaje.ebean.Expression;
import com.avaje.ebean.Junction;
import com.avaje.ebean.event.BeanQueryRequest;
import com.avaje.ebeaninternal.api.HashQueryPlanBuilder;
import com.avaje.ebeaninternal.api.ManyWhereJoins;
@@ -60,7 +61,7 @@ abstract class LogicExpression implements SpiExpression {
public void writeDocQuery(DocQueryContext context) throws IOException {
boolean conjunction = joinType.equals(AND);
context.startBool(conjunction);
context.startBool(conjunction ? Junction.Type.AND : Junction.Type.OR);
expOne.writeDocQuery(context);
expTwo.writeDocQuery(context);
context.endBool();