95,170 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
14
views
problem in autoflush of nativequery when upgrading from hibernate 5 to hibernate 6
in hibernate 5, in one session, if I update table SLI_PGRP_CNTN and then run following nativequery
sql = "SELECT {P.*} FROM SLI_PGRP_CNTN P WHERE SCTN_CNTN_KEY=:sctnCntnKey AND PGRP_PRFX_CODE=:...
0
votes
0
answers
31
views
Unable to get public no-arg constructor (Blaze Persistence)
I am working on a project with Wildfly 36, Hibernate 6.6.7, Jakarta EE, JDK 21.
I am trying to integrate blaze persistence into the project and I am using version 1.6.17.
Is it the correst version of ...
0
votes
0
answers
25
views
Cannot invoke "org.hibernate.engine.spi.EntityHolder.isInitialized()" because "data.entityHolder" is null
With wildfly-29.0.1.Final (hibernate 6.2.6.Final), my code works.
Unfortunately with wildfly-37.0.0.Final (hibernate 6.6.19.Final). I do get :
Cannot invoke "org.hibernate.engine.spi.EntityHolder....
0
votes
0
answers
29
views
How can I map a column of Json Array into a list or map of non-pk column mapping?
I have two tables.
-- child
id key (VARCHAR, UNIQUE)
----------------------------------
0 'a'
1 'b'
-- parent
id child_keys (JSON)
---------------------------...
-5
votes
1
answer
92
views
unable to obtain isolated JDBC connection
org.postgresql.util.PSQLException: FATAL: invalid value for parameter "TimeZone": "Asia/Calcutta"
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(...
1
vote
2
answers
79
views
Mapping multiple subclasses to same Parent ID in JPA Joined Inheritance
I created the tables Person, PersonExtra, PersonBasic, etc. in my database with the superclass Person and subclasses PersonExtra and PersonBasic.
@Entity
@Table(name = "person")
@Inheritance(...
0
votes
1
answer
60
views
jpql statement to involve multiple conditions
I use scheduler to pick up tasks from database based on the status of associated document. I have one task to many documents relationship, and each Document entity has its own status value.
I need to ...
1
vote
0
answers
69
views
What is the proper way to expose JPA managed entities in Java Entity Models?
Say I have a model with a many to many or many to one relationship. This model would like this:
@Entity
public class A {
// other fields ...
@OneToMany(...)
private List<B> bEntities = ...
1
vote
1
answer
53
views
JPA : how to get benefit of the 2nd level cache after Hibernate changed to prevent select n+1
Situation
Imagine the cacheable JPA Entity :
@Entity
@Table(name = "COUNTRY")
@Cacheable
@Getter
@Setter
public class CountryEntity {
@Id
@Column(name = "CODE")
...
0
votes
1
answer
32
views
How do GWT RPC transactions work with JPA/Hibernate on a database? [closed]
Working on this huge DAQ project made with GWT(mariaDB as db) , my main purpose is to replace some UI components and with them, their functionalities(for this case, users management , where you can ...
3
votes
1
answer
75
views
Missing constructor when using SELECT NEW DTO with query Java Persist Query Language
I am using Spring Data JPA with Hibernate 6. I want to fetch a list of cars into a DTO using JPQL SELECT NEW syntax, with LEFT JOIN, GROUP BY, and CASE conditions.
I keep getting the following error:
...
1
vote
0
answers
108
views
Hibernate 6 native query on parent class fails with "ORA-17006: Invalid column name"
After upgrading from Hibernate 5 to Hibernate 6, a native query that used to work now fails with an "ORA-17006: Invalid column name" error.
Entity definitions
Base class:
@Entity
@Table(name = "...
0
votes
1
answer
63
views
Duplicate key violation when updating "owner" entity of a one-to-one relation with a new "owned" value
I have two entities, Vehicle and Driver, with a one-to-one relationship. I also have a database constraint to ensure the uniques of a vehicle-to-driver relationship.
@Entity
class Vehicle(
@Id
val ...
0
votes
0
answers
21
views
Hibernate (5.3.3.Final) + Redisson (3.17.7) in a SBT project isn't evicting the cache from redis based on configured TTL
I am using a java-scala project and have configured the RedissonClient programmatically:
public class RedissonConfigurationFactory extends RedissonRegionFactory{
private static RedissonClient ...
0
votes
0
answers
28
views
Spring EntityManager persist vs merge for manual cascading one to many relationship [duplicate]
I have Post and Comment entities with one to many relationship.
@Entity
public class Post{
@Id
private Integer id;
@OneToMany(mappedBy ="post")
private Set<Comment&...