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
Consider a case where I have function defined in the DB returning true/false. I can now query its result in the select portion of the query, but not in the where. For example:
Unexpected exception
java.lang.IllegalStateException: Unknown boolean expression: FunctionExpression{name='is_team_active', expressions=[RuntimePersistentPropertyPath{runtimePersistentProperty=Team.status}]}
at io.micronaut.data.model.query.builder.sql.AbstractSqlLikeQueryBuilder2$SqlPredicateVisitor.visitPredicate(AbstractSqlLikeQueryBuilder2.java:1798)
at io.micronaut.data.model.query.builder.sql.AbstractSqlLikeQueryBuilder2$SqlPredicateVisitor.visitConjunctionPredicates(AbstractSqlLikeQueryBuilder2.java:1824)
at io.micronaut.data.model.query.builder.sql.AbstractSqlLikeQueryBuilder2$SqlPredicateVisitor.visitConjunctionPredicates(AbstractSqlLikeQueryBuilder2.java:1822)
at io.micronaut.data.model.query.builder.sql.AbstractSqlLikeQueryBuilder2$SqlPredicateVisitor.visitConjunctionPredicates(AbstractSqlLikeQueryBuilder2.java:1822)
at io.micronaut.data.model.query.builder.sql.AbstractSqlLikeQueryBuilder2$SqlPredicateVisitor.visitConjunctionPredicates(AbstractSqlLikeQueryBuilder2.java:1822)
at io.micronaut.data.model.query.builder.sql.AbstractSqlLikeQueryBuilder2$SqlPredicateVisitor.visit(AbstractSqlLikeQueryBuilder2.java:1811)
at io.micronaut.data.model.jpa.criteria.impl.predicate.ConjunctionPredicate.visitPredicate(ConjunctionPredicate.java:45)
at io.micronaut.data.model.query.builder.sql.AbstractSqlLikeQueryBuilder2.buildWhereClause(AbstractSqlLikeQueryBuilder2.java:508)
at io.micronaut.data.model.query.builder.sql.AbstractSqlLikeQueryBuilder2.buildSelect(AbstractSqlLikeQueryBuilder2.java:206)
at io.micronaut.data.model.jpa.criteria.impl.AbstractPersistentEntityCriteriaQuery.buildQuery(AbstractPersistentEntityCriteriaQuery.java:117)
For the isTrue code:
Unexpected exception
java.lang.IllegalStateException: Expression is expected to be a property path! Got: FunctionExpression{name='is_team_active', expressions=[RuntimePersistentPropertyPath{runtimePersistentProperty=Team.status}]}
at io.micronaut.data.model.jpa.criteria.impl.CriteriaUtils.requireBoolProperty(CriteriaUtils.java:86)
at io.micronaut.data.model.jpa.criteria.impl.AbstractCriteriaBuilder.isTrue(AbstractCriteriaBuilder.java:421)
at io.atono.backlogitem.BacklogItemFilter.makeQueryFilter(BacklogItemFilter.java:35)
at io.micronaut.data.runtime.intercept.criteria.AbstractSpecificationInterceptor.lambda$getCriteriaQueryBuilder$5(AbstractSpecificationInterceptor.java:417)
at io.micronaut.data.runtime.intercept.criteria.AbstractSpecificationInterceptor.buildInternalQuery(AbstractSpecificationInterceptor.java:340)
at io.micronaut.data.runtime.intercept.criteria.AbstractSpecificationInterceptor.buildFind(AbstractSpecificationInterceptor.java:324)
at io.micronaut.data.runtime.intercept.criteria.AbstractSpecificationInterceptor.preparedQueryForCriteria(AbstractSpecificationInterceptor.java:219)
at io.micronaut.data.runtime.intercept.criteria.AbstractSpecificationInterceptor.findAll(AbstractSpecificationInterceptor.java:154)
at io.micronaut.data.runtime.intercept.criteria.FindAllSpecificationInterceptor.intercept(FindAllSpecificationInterceptor.java:46)
at io.micronaut.data.runtime.intercept.DataIntroductionAdvice.intercept(DataIntroductionAdvice.java:83)
Steps To Reproduce
No response
Environment Information
This problem does not depend on OS or Java version.
I am using "io.micronaut.data:micronaut-data-jdbc:4.9.5" thouogh, which I think is the latest at the time of writing.
The rest of Micronaut is from"io.micronaut.platform:micronaut-platform:4.6.3"
Example Application
No response
Version
4.6.3
The text was updated successfully, but these errors were encountered:
Expected Behavior
Consider a case where I have function defined in the DB returning true/false. I can now query its result in the select portion of the query, but not in the where. For example:
Or using isTrue
Actual Behaviour
For the direct use in the query
For the isTrue code:
Steps To Reproduce
No response
Environment Information
This problem does not depend on OS or Java version.
I am using
"io.micronaut.data:micronaut-data-jdbc:4.9.5"
thouogh, which I think is the latest at the time of writing.The rest of Micronaut is from
"io.micronaut.platform:micronaut-platform:4.6.3"
Example Application
No response
Version
4.6.3
The text was updated successfully, but these errors were encountered: