Add filterManyRaw() and Deprecate filterMany( <string expressions> )

The filterMany( <string expressions> ) uses the language parser which
ultimately will we probably remove in ebean 15.x

Code can migrate to filterManyRaw() instead or better yet change to
use the improved query beans filterMany( <closure> ) option that will
be included in this same ebean release.
This commit is contained in:
Rob Bygrave
2023-08-21 11:15:39 +12:00
parent 3e41c5973b
commit fbcd4c3133
6 changed files with 140 additions and 1 deletions
@@ -444,6 +444,11 @@ public class DefaultExpressionList<T> implements SpiExpressionList<T> {
return query.filterMany(manyProperty).where(expressions, params);
}
@Override
public ExpressionList<T> filterManyRaw(String manyProperty, String rawExpression, Object... params) {
return query.filterMany(manyProperty).raw(rawExpression, params);
}
@Override
public Query<T> withLock(Query.LockType lockType) {
return query.withLock(lockType);
@@ -317,6 +317,11 @@ final class JunctionExpression<T> implements SpiJunction<T>, SpiExpression, Expr
throw new IllegalStateException("filterMany not allowed on Junction expression list");
}
@Override
public ExpressionList<T> filterManyRaw(String manyProperty, String rawExpression, Object... params) {
throw new IllegalStateException("filterMany not allowed on Junction expression list");
}
@Override
public Query<T> usingTransaction(Transaction transaction) {
return exprList.usingTransaction(transaction);