quarkus-hibernate-types
quarkus-hibernate-types copied to clipboard
Array types are missing
Hi,
I've migrated a Spring project to Quarkus and by doing so I had an issue when using Vlad Mihalcea's hibernate-types within a Quarkus native-image. I checked back in the Quarkus Zulipchat if there is a way to fix it and I got recommended this project.
The issue I'm now facing when using this project is that all the array types are missing.
Would be great if this can be added to this project.
same here!
Mapped a typed List<T> on my Entity but it fails when persisting a new Entity.
Error:
12:07:53 [io.qu.ve.ht.ru.QuarkusErrorHandler] (vert.x-eventloop-thread-2) HTTP Request to /hero failed, error id: bda89b4e-d534-4b22-8d27-55efa37ef128-4: io.vertx.core.impl.NoStackTraceThrowable: Parameter at position[4] with class = [com.fasterxml.jackson.databind.node.ArrayNode] and value = [[{"name":"Bla","tier":"Base","score":1,"aliases":"test, test","description":"bla"}]] can not be coerced to the expected class = [java.lang.Object] for encoding.
12:07:53 [or.jb.re.re.co.co.AbstractResteasyReactiveContext] (vert.x-eventloop-thread-2) Request failed: io.vertx.core.impl.NoStackTraceThrowable: Parameter at position[4] with class = [com.fasterxml.jackson.databind.node.ArrayNode] and value = [[{"name":"Bla","tier":"Base","score":1,"aliases":"test, test","description":"bla"}]] can not be coerced to the expected class = [java.lang.Object] for encoding.
Payload:
{
"name": "Test",
"level": 1,
"picture": "https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/chewbacca--684239239428094811.jpg",
"powers": [
{
"name": "Bla",
"tier": "Base",
"score": 1,
"aliases": "test, test",
"description": "bla"
}
]
}
Hi there, sorry if I am a bit late to the party, but I managed to get the types running using the "real" dependencies. So it should be no problem mapping arrays or lists anymore. Feel free to test your usecases on my fork / pull request :)