Questions tagged as 'jpa'

1
answer

JPA Query Filtering by Entity List

I'm running a Java system using SpringBoot and JPA , being event management and I have two entities: Inscricao and HorarioAtividade . They have a Many To Many relationship, with my class Inscricao having a list of...
asked by 04.07.2018 / 17:07
0
answers

Update child without deleting record using JPA

I have an entity that has a list inside it. This list is of the same type as its entity. Ex: public class Aluno(){ List<Pessoa> responsaveis = CollectionsBuilder.createDefaultArrayList(); } When updating the student, removing a re...
asked by 26.06.2018 / 15:31
1
answer

Jasper with JPA connection

I'm in a Java Desktop project using JPA, just to issue some reports where I'm using jasper. The reports have sql queries the user interface will only pass parameters to the data filtering. I found it difficult to get the connection so in a qu...
asked by 16.05.2018 / 04:40
1
answer

Relationship of one column to several

I have an entity class of Medical name, in which it has an IDMedical column. It relates to the Attendance entity class, which in turn has a MedicalID column, which would be a foreign key of that first. There is also in this table, Attendance,...
asked by 18.05.2018 / 18:32
1
answer

Map relationship between tables without foreign key

I have two tables in postgresql: schema1.imovel idt_imovel | int cod_imovel | string nome_imovel | string etc... schema2.declaration idt_declaracao | int cod_imovel | string status | string etc... The two tabl...
asked by 27.04.2018 / 14:20
1
answer

Join multiple fetch returning duplicate JPA Criteria API values

In the method in question I want to return the query with the joins of employee and company. However, the Company class is related to the Query and to the Employee, and is returning duplicate in the JSON. Query class @Entity @Table(name="CO...
asked by 04.04.2018 / 20:44
1
answer

Omit DTO attribute (Spring Data JPA)

Hello, I have two classes DTO (CategoryDTO and ProductDTO) in a restfull application, how can I omit a particular attribute of the ProductDTO when it is used in the CategoryDTO class? Below are the classes, the return on the Postman, and what I'm...
asked by 23.03.2018 / 14:12
2
answers

Problems with relationship @ManyToMany

Good afternoon, guys, I'm having trouble with a @ManyToMany relationship. I have the Equipamento class and I have the Fornecedor class, where I can have a vendor that has multiple equipment and where I can also have equipment that...
asked by 23.03.2018 / 21:49
0
answers

Change JPA / JPQL record [closed]

I'm doing my first WEB project and I have a question about using JPA / JPQL / MERGE. The question is: I need to change a record of a table, I've created a dataTable that returns me a list of Open Tickets. This table is populated by my V...
asked by 14.12.2017 / 02:55
0
answers

JSF and JPA with EclipseLink: Inserting element twice in the database

I'm working on software and I'm having a headache to insert some related objects. It is inserting this object twice and the error is not visible. To see the whole project, follow the link from github: Complete Project . The classes that are...
asked by 03.12.2017 / 15:24