Skip to main content

Questions tagged [hibernate]

Hibernate is an object-relational mapping (ORM) library for the Java language enabling developers to utilize POJO-style domain models in their applications in ways extending well beyond Object/Relational Mapping.

hibernate
0 votes
0 answers
10 views

java.lang.ClassNotFoundException: Could not load requested class : charset

I am attempting to add spring data jpa to an existing spring boot 2.7.3 web app. We're using hibernate 5.6.9. I've added spring data jpa as a maven dependency via the spring-boot-starter-data-jpa ...
Zack Macomber's user avatar
0 votes
0 answers
7 views

How can I get all errors of a Hibernate schema validation?

In a Spring Boot 3.x application I can validate the JPA entities against the schema using this property: spring.jpa.hibernate.ddl-auto=validate. However, its main drawback is that the application logs ...
Robert Strauch's user avatar
0 votes
1 answer
29 views

Bitwise operation in HQL

I am using Hibernate 6, and I have created a custom dialect. Below is my CustomPostgreSQLDialect.java: public class CustomPostgreSQLDialect extends Dialect { @Override public void ...
vcoder's user avatar
  • 1
-1 votes
0 answers
12 views

How to track nested property changes using Javers in a Spring Boot and PostgreSQL environment?

I'm working on a Spring Boot application with a PostgreSQL database and I'm using Javers for auditing. I have the following entity structure: import javax.persistence.*; import lombok.Getter; import ...
ya_dimon's user avatar
  • 3,682
-1 votes
0 answers
11 views

updating hibernate ScrollableResult or Spring Data JPA Slice when updated column is in query halves number of rows processed

I've come across some curious but consistent behaviour when processing large batches of results using either Spring JPA Slice or Hibernates ScrollableResult where an update is made on a column that is ...
Parawata's user avatar
0 votes
0 answers
17 views

How to persist OneToOne self referencing entity with JoinTable

I'm having the following problem: Given the following entity: @Entity public class Person implements Serializable { @Id @NaturalId @Column(columnDefinition = "DECIMAL(39,0)") ...
MuJulDo's user avatar
0 votes
0 answers
33 views

Hibernate Search Bytecode Enhancement Issue

I have encountered an issue while using Hibernate Search. The versions I am using are as follows: Java21 Spring Boot 3.2.7 Hibernate 6.4.9.Final hibernate-search-backend-elasticsearch:7.1.0.Final VM ...
qwer's user avatar
  • 1
0 votes
0 answers
28 views

how to get the difference between two dates in JPA criteriabuilder api?

Im trying to use criteria builder to get the difference between two dates in millisecond or smaller precision. I’m using H2, and for the life of me i cant do: cb.function(“DATEDIFF”, BigInteger.class, ...
Daniel Goldberg's user avatar
-1 votes
0 answers
18 views

Nested @TenantId in Hibernate / Spring JPA

the Hibernate feature @TenantId looks very promising for my use case. I'm wondering if it's possible to apply the automatic-tenantId-setting on nested tenants like: tenant1 sub-tenant1.1 sub-tenant1....
Alex Schmidt's user avatar
0 votes
0 answers
27 views

Application.getResources() is null or {0} is not a valid data source

Previously myApp ran on Payara 5-2022.5 Community Edition with Jakarta EE8, java 8, and Hibernate 5.6.15 with multi-tenancy. And no any error when starting from Netbeans 22. I converted myApp from ...
PeterL355's user avatar
0 votes
0 answers
28 views

What is the advantage of using StringNVarcharType over StringType for mappings to columns of type NVARCHAR?

Hibernate seems to work equally well with columns of type NVARCHAR when using either StringNVarcharType or StringType for mapping. Using StringType, which is the default, seems to offer some ...
01es's user avatar
  • 5,392
-1 votes
0 answers
20 views

Hibernate performs redundant DB call to fetch child entity data along with parent during refresh event which is already fetched

I am using Hibernate 5.6.15. Hibernate performing Cascade Refresh of the associated child entities and then use LEFT OUTER JOIN on the parent entity with same child entities and fetch them again I ...
Navpreet Singh's user avatar
-1 votes
0 answers
20 views

Need to extract a method to use in equals implementation with Hibernate DTO's

I am updating a Java project and had to add an equals() implementation 3 java DTO files (call them Child1, Child2 and Child3) which all extend the DTO Parent class. IntelliJ generated the following ...
ponder275's user avatar
  • 923
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 ...
Thilakraj's user avatar
-1 votes
0 answers
10 views

Problem with Hibernate 6 and multi level inheritance: Add joins

I'm facing a problem when using a 2-level inheritance in Hibernate 6.2.13.Final. I have a grandfather class: ClinicalAct I have a father class: Consultation that extends ClinicalAct I have 2 children ...
Faliorn's user avatar
  • 1,419

15 30 50 per page
1
2 3 4 5
6348