mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1211 - ENH: Support L2 cache complex natural keys include findList() queries
This commit is contained in:
@@ -5,6 +5,7 @@ import io.ebean.plugin.ExpressionPath;
|
||||
import io.ebeaninternal.api.SpiExpression;
|
||||
import io.ebeaninternal.api.SpiExpressionRequest;
|
||||
import io.ebeaninternal.server.el.ElPropertyValue;
|
||||
import io.ebeaninternal.api.NaturalKeyQueryData;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
@@ -26,6 +27,15 @@ public class SimpleExpression extends AbstractValueExpression {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean naturalKey(NaturalKeyQueryData data) {
|
||||
// can't use naturalKey cache for NOT IN
|
||||
if (type != Op.EQ) {
|
||||
return false;
|
||||
}
|
||||
return data.matchEq(propName, bindValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeDocQuery(DocQueryContext context) throws IOException {
|
||||
if (type == Op.BETWEEN) {
|
||||
|
||||
Reference in New Issue
Block a user