-
Notifications
You must be signed in to change notification settings - Fork 92
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
Embeddedable not mapped correctly as JSON #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.
Strange, we are able to map JSON fields to classes just fine in Quarkus 3.13.3 (Hibernate 6.5.2). Since our update to Quarkus 3.14.1 (Hibernate 6.6.0) we started to experience these problems. |
It's probably a regression due to some changes between 6.5 and 6.6. Anyway, I'm looking into it. |
This information is now available and it's required when working with JSON.
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.
It confirms that queries on entities with regular BigDecimal fields are working.
This issue should be fixed in the next release. |
By the way, @stefvanderweldevolksbanknl, with this fix, you won't need to specify Anyway, I'm reviewing what we support and I will update the documentation as part of #1606 |
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: