-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bigdecimal cannot be coerced to expected class String in 2.4 #1984
Comments
Which database? |
Postgres 15.4 in production environment. Also does not work locally in a testcontainer with 16.1-alpine postgres image |
Would you be able to provide a test case? |
We test with BigDecimal and it seems to work fine: Line 363 in 80e4ed9
But it seems you are using criteria and a function. So I don't know if there's something different compare to what we are doing. |
Actually, the test I linked doesn't run a query. So it might not really be relevant |
@nielsvhaldvb I've created this testcase and it seems to work. Could you update it to make it look more similar to your case, please? |
Hi, thanks for your testcase! Could it have something to do with the property being within a
We then use jsonb_extract_path_text() to query like this:
|
There are 2 problems:
|
By the way, I've created a new test case here: DavideD@4cd00b7 |
It confirms that queries on entities with regular BigDecimal fields are working.
This information is now available and it's required when working with JSON.
Hi, an application of ours broke using Hibernate Reactive in Quarkus when updating quarkus to 3.14.1 and fixed by reverting to 3.13.3.
Quarkus 3.14 started using Hibernate ORM 6.6 / Reactive 2.4.
org.hibernate.HibernateException: io.vertx.core.impl.NoStackTraceThrowable: Parameter at position[3] with class = [java.math.BigDecimal] and value = [200] can not be coerced to the expected class = [java.lang.String] for encoding
Usage: ( jakarta.persistence.criteria.CriteriaBuilder )
predicates.add( criteriaBuilder.between( criteriaBuilder .function( JSONB_EXTRACT_PATH, String.class, amountPath, criteriaBuilder.literal(AMOUNT)) .as(BigDecimal.class), filter.getAmountGe(), filter.getAmountLe()));
Are there any known issues within 6.6/2.4?
The text was updated successfully, but these errors were encountered: