Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
101 views

I'm building a Spring server program which uses a PostgreSQL database. For one of the table columns, I want to restrict the possible values to a static pre-defined set, so I created a PostgreSQL enum ...
Gustav Blaß's user avatar
0 votes
0 answers
28 views

I have a test case that tests all the DAOs in my project. It uses openpojo to get the list of all DAO classes. The test case then iterates over the list of DAO classes and invokes all methods in them ...
siddhant's user avatar
1 vote
1 answer
69 views

I am facing an issue while saving or fetching string fields into postgres database in JDK21 and Spring boot 3.3.2 and hibernate 6.6.1.Final version , where its always trying to map empty value to ...
shanta's user avatar
  • 1
0 votes
0 answers
80 views

I have an entity holding a collection of embeddable objects: @Entity(name = "LogbookEntry") public class LogbookEntryView { @ElementCollection(fetch = FetchType.EAGER) @...
Double M's user avatar
  • 1,513
0 votes
1 answer
38 views

I’m using Hibernate v6.6 with optimistic locking, and all of my entities have a @Version field. My Person entity has a ManyToMany association to Concept entity: @Entity class Person { @Id @...
Apoorva Manjunath's user avatar
0 votes
0 answers
21 views

I'm trying to create java resources using Hibernate framework to represent some Business entity like Product or Address along with Localization. I want to use one localization table for all entities ...
Roman N's user avatar
2 votes
2 answers
237 views

I have the following Hibernate tables in Spring Boot 3.5.0 application: import com.fasterxml.jackson.annotation.JsonIgnore; import org.hibernate.annotations.NotFound; import org.hibernate....
Peter Penzov's user avatar
0 votes
1 answer
66 views

I am upgrading an ancient Spring 3 app to Spring 6. I have found a number of issues with the same message, but they are mostly actually using annotations. The one that isn't: java/hibernate Exception: ...
Thom's user avatar
  • 15.3k
0 votes
1 answer
95 views

I have a parent class: Person and two child classes: Hunter and Policeman. A Hunter can have several Dog, and a Policeman can only have one Dog. It's a unidirectional relationship, the Dog entity only ...
parsecer's user avatar
  • 5,261
1 vote
1 answer
115 views

I have the following classes: @Entity @Getter public class EntityA { @Id private long id; Map<String, List<EntityB>> map; } @Entity @Getter public class EntityB { @Id ...
AixNPanes's user avatar
  • 1,288
0 votes
0 answers
37 views

With Hibernate 6.2, how to do not-found handling for a entity with @Any association? My entity mapping is: @Any @AnyDiscriminator(DiscriminatorType.STRING) @AnyKeyJavaClass(UUID.class) ...
Apoorva Manjunath's user avatar
1 vote
1 answer
54 views

I'm using Hibernate 5 and I need to configure them using code. I have established the Connection. But the Entity classes are not mapped. So How can I do this. Due to this I can't able to insert data ...
Dood's user avatar
  • 15
1 vote
1 answer
131 views

I have a table my_entity that is referenced by multiple @Entity annotated classes like so: @Immutable @Entity @Table(name = "my_entity") public class EntityA { ... } @Entity @Table(name = &...
flauschtrud's user avatar
0 votes
0 answers
44 views

I have a query cache called RatesCache to store the result of my database call of RateEntities. I set the query cache like this for test purpose and every 30s ttl, when it expires it make a new call ...
yuyusqqsd's user avatar
-1 votes
2 answers
97 views

i have 2D double array attribute but as JPA doesn't work with array i have a @XmlJavaTypeAdapter(DoubleArrayAdapter.class) to store my array in a string for postgresql... I am working with JDK 21 and ...
ghelle's user avatar
  • 1
0 votes
1 answer
37 views

My entity MrsConHist has One to many map to MrsConHistCar, MrsConHist and MrsConHistCar both have composited key class. when MrsConHist.getMrsConHistCar(...), I got error: [ORA-00942: table or view ...
Daxin's user avatar
  • 1
0 votes
1 answer
34 views

I have two tables in one-to-one association, mapped by their primary keys. PKs are UUID. I'd like to map these in hibernate, so that I will persist parent entity and referenced child entity will get ...
Martin Mucha's user avatar
  • 3,279
0 votes
1 answer
114 views

I am upgrading an spring boot app (spring-boot-starter-parent) from 2.6.1 to 3.4.1. part of that upgrade is related to the upgrade of hibernate 5 to 6 and specifically hibernate core 6.6.4.Final with ...
Tito's user avatar
  • 2,310
0 votes
0 answers
50 views

I have a class with enum: import jakarta.persistence.*; import lombok.Getter; import lombok.Setter; import org.hibernate.annotations.JdbcType; import org.hibernate.dialect.PostgreSQLEnumJdbcType; ...
Denys's user avatar
  • 1
0 votes
1 answer
196 views

So I was upgrading my old application to Hibernate 6, I was able to get most of the code sorted. But this one column type is causing a problem. @Column(name = "JOB_ID", columnDefinition = &...
hell_storm2004's user avatar
2 votes
1 answer
744 views

Update 2025/05/12 Having tried to create a Hibernate Test Case, I found out that my problem isn't about generic identifiers. It's about composite keys whose fields are distributed between classes. The ...
Yury Shafran's user avatar
1 vote
1 answer
60 views

@Entity @Table(name = "student") public class Student { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; // other fields @ElementCollection @...
Sudhanva BS's user avatar
1 vote
1 answer
213 views

I’m encountering an issue while working on a Spring Boot application that uses Hibernate for ORM. Could not extract column [3] from JDBC ResultSet [Bad value for type long : Allows creating new ...
Martin Dúbravka's user avatar
0 votes
2 answers
112 views

I'm learning Hibernate (v. 6.6.1 final) and have a problem with a OneToOne relation Customer Entity @Entity @Table(name = "customer") public class Customer { @Id @Column(name = &...
CodeCrafter's user avatar
0 votes
1 answer
121 views

I'm learning Hibernate ( v. 6.6.1 final) and have a problem I have two entity classes Person @Entity @Table(name = "person") public class Person { @Id @Column(name = "id")...
CodeCrafter's user avatar
0 votes
1 answer
39 views

I have a problem because my table has a self relationship. I have to be able to insert and change the column, but it always gives this error: Column 'idTipoDoctoEntrada' is duplicated in mapping for ...
Felipe Veiga's user avatar
0 votes
1 answer
120 views

I am following DDD in my application and I want to separate my persistence layer from domain layer. I have to map the Domain objects to JPA entities for persistence. I have one Domain aggregate named ...
genuinebookworm's user avatar
0 votes
1 answer
107 views

I've got a Hibernate entity with an optional relationship to another entity: @NamedEntityGraph( name = "expense-for-frontend", attributeNodes = { @NamedAttributeNode("...
Kevin's user avatar
  • 1,881
0 votes
1 answer
37 views

Has anyone mapped a numeric array in PostgreSQL to a List of CustomObject in Java via Hibernate? SQL CREATE TABLE sal_emp (name varchar, work_station bigint[]); INSERT INTO sal_emp VALUES ('one', '{1,...
Gautham Churchill's user avatar
2 votes
1 answer
81 views

In the process of upgrading from Grails 3 to Grails 6, I am getting different behavior in bootRun vs. war deployments. This setting in conf/application.groovy is set to disable the version (optimistic ...
Ben W.'s user avatar
  • 401
0 votes
1 answer
780 views

I have a task to migrate to Spring Boot 3.x (from Spring Boot 2.6.5) and I chose OpenRewrite tool to help me with this task. After all the migration changes were done, running the application locally ...
user3762913's user avatar
0 votes
1 answer
138 views

Recently, we migrated from Spring Boot 3.0 to 3.2 and lost our ability to insert an object into the Oracle database. The following is the object in contention: @Entity @Table(schema="S1", ...
user1540821's user avatar
4 votes
1 answer
224 views

I’m facing significant challenges with NHibernate in my .NET application, particularly around dynamically creating tables and altering schemas at runtime. My application needs to create millions of ...
Ember Freak's user avatar
  • 12.9k
0 votes
1 answer
60 views

I'm encountering an issue with a @ManyToMany mapping in my Spring Boot application using Hibernate. The problem arises when Hibernate tries to execute a query involving the join table for a Set<...
Malumbo's user avatar
1 vote
0 answers
81 views

I have a database on which 2 tables have a double relationship : Database graph The Spot may be the parent of several SpotConditions, so there is a basic OneToMany relationship. But in addition, each ...
Colin Lefebvre's user avatar
0 votes
0 answers
30 views

pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 ...
Vikram Markali's user avatar
0 votes
1 answer
82 views

I have a question regarding Hibernate that's been bothering me for some time. Consider I have two entities: @Entity public class Statement { @Id @Column private int id; @Column ...
Krusty the Clown's user avatar
0 votes
0 answers
280 views

I'm new to Java and I am trying to migrate from Hibernate 5 to 6. My application uses joda-time for the timestamp data type. It is using both annotation and hibernate mapping files. Following is a ...
tieuquynd's user avatar
0 votes
0 answers
36 views

I have a stored procedure from my DBA team. Here is the stored procedure, and temp table created. All I want to know here, how to map the temp table to the output value while calling the procedure in ...
Just a coder's user avatar
0 votes
0 answers
142 views

I am encountering an issue with the @SoftDelete annotation in my entity class. It forces eager loading, which is causing performance issues. Consider the following class: @Entity @Data @SoftDelete ...
user1470509's user avatar
1 vote
1 answer
63 views

I searched for a long time but I cannot understand what I am doing wrong here. I'm using spring boot with starter-data-jpa. Versions: Hibernate: 6.3.1.Final HikariCP: 5.1.0 springboot dependency ...
Azn9's user avatar
  • 99
0 votes
0 answers
45 views

I have 3 entity class Parameter entity class with multiple ManytoOne relationship. Entity class below @Entity @Table(name = "t_gcg_parameter") public class GcgParameter extends Common ...
kukuh utama's user avatar
0 votes
1 answer
145 views

Person ID Name 1 Luis 2 Frank Address Person-ID Address City 1 Samantha Road x 1 Franklin y In my Hibernate native query I want to map the result of one person to a set of addresses, such like the ...
sensen ol's user avatar
0 votes
0 answers
51 views

Below is my Owning side Entity - @Entity @Table(name = "T_PERSON") @Inheritance(strategy = InheritanceType.JOINED) public class Person { private Long id; private String firstName; private ...
Debaprasad Jana's user avatar
-1 votes
1 answer
32 views

So, I have 2 entities: Room: @Entity @Table(name = "rooms") public class Room { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String type; ...
Xuhe12's user avatar
  • 3
1 vote
1 answer
1k views

I have recently upgraded to IntelliJ IDEA 2024.1. I work with the Hibernate framework and I used very often the 'Generate persistence mapping' feature from the Persistence window but it seems that ...
Jose's user avatar
  • 21
0 votes
1 answer
46 views

I have 2 tables Room and Guest @Entity @Table(name = "rooms") public class Room { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String type; private String ...
Xuhe12's user avatar
  • 3
0 votes
2 answers
64 views

@Entity public class Book implements Serializable { @Id private Long bookId; private String title; @ManyToOne @JoinColumn(name = "author_id") private Author author;...
Chris311's user avatar
  • 4,012
0 votes
1 answer
39 views

My DB Structure is as follows : Table : product prod_id ... Table : product_category prod_id category_id ... Product_category has Unique contsraint on (...
dhinkatika's user avatar
0 votes
1 answer
52 views

I have created a Customer entity class as well as an Order entity class! I have mapped the two as One-To-Many and Many-To-One bi-directional! I have set the CascasedType on both classes to REFRESH, ...
Yavaar Nosimohomed's user avatar

1
2 3 4 5
65