You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
orderByClause is CASE
WHEN (cc IN ('1','2','3','4')
or dd in ('1','2','3','4')) and ( array_contains(qq,'5') ) THEN 1
else 5
END;
the error is
ava.lang.RuntimeException: Expecting [and] to be asc or desc? at io.ebean.OrderBy.isAscending(OrderBy.java:446) at io.ebean.OrderBy.parseProperty(OrderBy.java:432) at io.ebean.OrderBy.parse(OrderBy.java:401) at io.ebean.OrderBy.(OrderBy.java:56) at io.ebeaninternal.server.querydefn.DefaultOrmQuery.orderBy(DefaultOrmQuery.java:1626) at io.ebean.Query.order(Query.java:1383) at io.ebean.typequery.TQRootBean.order(TQRootBean.java:1295) at
the orderByClause has comma
The text was updated successfully, but these errors were encountered:
Can you try orderBy().asc(yourString)?
Note: ebean tries to do a simple parsing when you set the orderBy statement. Normally you would specify a comma separated list of properties. So complex expressions might not work.
If your sort expression is constant, you might define a @Formula(select=yourExpression) property in your model and just sort on that property. Ebean will then substitute the query fragment. (Of course this is a workaround and makes only sense, if your formula is constant. Keep in mind that you may need additional annotations like specifiing FetchType.LAZY)
Roland
orderByClause is CASE
WHEN (cc IN ('1','2','3','4')
or dd in ('1','2','3','4')) and ( array_contains(qq,'5') ) THEN 1
else 5
END;
the error is
ava.lang.RuntimeException: Expecting [and] to be asc or desc? at io.ebean.OrderBy.isAscending(OrderBy.java:446) at io.ebean.OrderBy.parseProperty(OrderBy.java:432) at io.ebean.OrderBy.parse(OrderBy.java:401) at io.ebean.OrderBy.(OrderBy.java:56) at io.ebeaninternal.server.querydefn.DefaultOrmQuery.orderBy(DefaultOrmQuery.java:1626) at io.ebean.Query.order(Query.java:1383) at io.ebean.typequery.TQRootBean.order(TQRootBean.java:1295) at
the orderByClause has comma
The text was updated successfully, but these errors were encountered: