Questions tagged [hibernate-types]
The Hibernate Types project gives you extra types and general purpose utilities that are not supported by the Hibernate ORM core
hibernate-types
45
questions
0
votes
0
answers
13
views
In Hibernate 5, The Jsonb sql column Serializer/Deserializer using SnakeCase than the camelCase (TypeDef JsonBinaryType)
While saving/retrieving Jsonb Object in a DB. JSON key are saved in SnakeCase than the CamelCase
Entity Class
@Entity
@TypeDef(name = "json", typeClass = JsonBinaryType.class)
public class ...
-1
votes
0
answers
22
views
How to force org.hibernate.Query to use org.hibernate.type.NullableType?
This question is in response to my earlier question being closed - TRACE logging of org.hibernate.type not seen after changing from WARN to TRACE using Configurator.setLevel
This is my test code:
...
0
votes
1
answer
179
views
Hibernate 6 addScalar for mapping json column to a pojo
I am trying to migrate from SpringBoot 2 to 3.
Previously, with the help of hibernate types we could run native queries and map the result to a POJO like so:
var sp = dbService....
0
votes
0
answers
45
views
Error after migrating spring boot to 3 in update query containing enum field [duplicate]
Have updated hibernate-types & hypersistence libraries as per other docs-
implementation 'com.vladmihalcea:hibernate-types-60:2.21.1'
implementation 'io.hypersistence:hypersistence-utils-hibernate-...
0
votes
0
answers
416
views
Using upper() and lower() functions with tstzrange type in JPQL in Hibernate 6 with Quarkus 3
I'm developing a Quarkus 3 application where I've integrated Hibernate 6. To work with custom PostgreSQL types, specifically tstzrange, I've incorporated hypersistence-utils-hibernate-62 from ...
0
votes
2
answers
7k
views
SpringBoot 3, PostGIS:: com.vladmihalcea.hibernate.type.basic.NullableCharacterType does not define or inherit
I am trying to migrate my current spring boot 2 application to 3. I am using PostGIS (I have not set explicit dialect so it uses org.hibernate.dialect.PostgreSQLDialect), along with a few jsonb ...
4
votes
0
answers
3k
views
Unable to instantiate AttributeConverter for JsonBinaryType
I have recently upgraded my springboot version to 3.0.2. Also, the hibernate dependencies were upgraded to 6.1.6.Final.
I am using hibernate-type 60 from hypersistence util.
<dependency>
&...
0
votes
1
answer
373
views
Store Java enums in Postgresql and Hibernate 6 using hbm.xml
I am unable to figure out how to store a Java Enum using a Postgresql Enum Type with Hibernate 6 and the legacy hbm.xml.
With Hibernate 5, I used to use the hiberate-types project with following XML:
&...
2
votes
1
answer
406
views
Tried to access method JavaXMember.getJavaType() from class JsonTypeDescriptor
I had a working Spring Boot project which is using Spring Data JPA and Hibernate as a JPA implementation. Some day running this project I got the following exception:
java.lang.IllegalAccessError: ...
1
vote
0
answers
359
views
Criteria API expression for where first element of array column is equal to
I'm trying to delete some entries from a table and the condition of the delete statement is "if the first element in the userIds array is 98 then delete".
My entity class looks something ...
0
votes
0
answers
544
views
How to call a repository and fetch results in spring boot
I have a simple call to fetch results by fetching results from a table. Everytime I end up getting
java.lang.NullPointerException: null at
java.base/java.lang.Class.isAssignableFrom(Native Method)
...
6
votes
2
answers
5k
views
Serializing stored json object gives null pointer hibernate vladmihalcea / hibernate-types
I'm saving a java object as json in my db. For this implementation when I save it, it works fine and I can find the new row in my db. However whenever I try to fetch the same object I stored, I get ...
0
votes
1
answer
330
views
Hibernate search : JSONB columns
We are currently using columns with type Jsonb in PostgreSQL and using Hibernate-types for mapping and insert/update (which is working very well so far) , the only limitations that we are finding ...
2
votes
2
answers
861
views
How to use a 'Hibernate Types' library type in a single native query that selects Postgres arrays?
I have a query that returns a Postgres array of UUIDs:
SELECT e.id, e.date,
ARRAY
(
SELECT cs.api_id FROM event_condition_set ecs
JOIN condition_set cs on cs.id = ecs.condition_set_id
WHERE ecs....
1
vote
1
answer
641
views
How to handle JSON value from Native Query in hibernate?
I have a query that returns a JSON column from PostgreSQL but I'm not able to handle it in JSON. It is giving me an error "No Dialect mapping for JDBC type: 1111;"
I'm using Native Query to ...