All Questions
Tagged with jpa persistence
1,177
questions
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 ...
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, @...
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 ...
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 ...
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 ...
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 ...
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....
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 ...
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 ...
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" ...
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 ...
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="...
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 ...
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 ...
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 ...