Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
1 answer
47 views

Problem with attribute names in persistence with JPA

I'm having a problem trying to map database columns to DTO with JPA in my backend. Some column names are not accepted, I don't know why. This began to occur after the use of quarkus. When I set the ...
Bruno Colares's user avatar
0 votes
0 answers
31 views

Spring Boot entity validation activate/deactivate field constraints for different composite classes [duplicate]

Question: I am implementing a spring boot microservice in which i have an entity C (with attributes name and address) referenced by 2 other entites A and B. @Entity class C {@NotNull string name, @...
velocity's user avatar
  • 1,908
0 votes
0 answers
36 views

Problem with cascade persist in Hibernate with 3 entities

I have 3 entities: Proyectos (projects), Plantillas (templates) and paginas (Pages). I am trying to do mapping with bidirectional relationships and I persist a new Project and I would like persist ...
XyVy's user avatar
  • 1
1 vote
1 answer
319 views

Generate persistence mapping feature in IntelliJ IDEA has dissapeared?

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
30 views

is persistece context necessary to crud aplications?

For CRUD applications where each operation must perform a select operation for the database (except persist), is it necessary to check the persistence context? Is there a way to avoid searching in the ...
mchuri's user avatar
  • 11
0 votes
1 answer
86 views

Hibernate generic type handling

I have an Entity class which has a generic type field. I want this class to be saved and read from the database. Hibernate can't just take that generic type and save/read it, which is why it asks for ...
Till's user avatar
  • 1
0 votes
0 answers
93 views

Hibernate 6.4 - datasource vs provider_class check is reversed in ConnectionProviderInitiator.java

It looks like that starting hibernate 6.3, the class ConnectionProviderInitiator has reversed the order in which it checks for "hibernate.connection.datasource" and "hibernate....
atul's user avatar
  • 1
0 votes
0 answers
50 views

Can I use a void function ID Setter to avoid duplicateKeyException error?

Is it correct, if I create a Public void function where I add an object to a list with the same UUID, to avoid getting "duplicateKeyException: A different object with the same identifier value ...
Lucianomp9's user avatar
0 votes
0 answers
80 views

Which way to map @ManyToMany is better: collections or entity class?

I am having a problem with choosing which way is the most efficient to map Many-To-Many relationship between tables in hibernate, jpa in my Spring Boot, Spring Data Jpa project. For example I have two ...
denstran's user avatar
  • 163
0 votes
0 answers
41 views

Hibernate Core Jar migration from hibernate-core-3.3.0.SP1.jar to hibernate-core-5.4.24.Final.jar

<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="persistenceUnitManager" ...
Saranya Palanisamy's user avatar
0 votes
2 answers
42 views

Change persisted class in JPA

I have my User class, which has its own table, and the Organizer class, which also has its own table and is a specialization of User. How do I make an already persisted User in JPA become an Organizer ...
Gabriel Basilio Souza's user avatar
0 votes
0 answers
34 views

EntityManager is null if not created Manually

I work on a maven project which is deployed as a runnable jar on a server. Unfortunately my EntityManager stays null if I not assign it manually. Persistence.xml <persistence-unit name="...
recklessGreed's user avatar
0 votes
1 answer
35 views

Jpa/hibernate why detached entity merged partially?

When i fetch entity from entity manager then make it detached and trying to delete related entities there is no changes in database to them. In other words after entity manager is closed (that is ...
randomuser333's user avatar
0 votes
0 answers
63 views

Jpa/hibernate problem while merge entity after remove related entity from it

I have two classes A and B that have many to many relationship. When i delete one item from list of B in class A and trying to merge this is doesn't work. public class Main { public static void ...
randomuser333's user avatar
0 votes
0 answers
28 views

Question about tutorial: "spring-data-jpa-multiple-databases", could there be an easier way?

https://www.baeldung.com/spring-data-jpa-multiple-databases According to this link you need to set up configuration class etc. To me it seems like a lot of work, for something that we could only ...
Jack's user avatar
  • 167

15 30 50 per page
1
2 3 4 5
79