Questions tagged as 'jpa'

1
answer

Persisting JSON Creating List Objects

Good afternoon guys, I'm having a question, I'm trying to persist a JSON via the API: { ... "Analise": [{ "nProcAnalitic": "SR-000446/2015", ... }] ... } And the service answers 200: ... "Anal...
asked by 13.11.2016 / 19:35
1
answer

EclipseLink and JPA

I have problems trying to write information to the database, in a simple WS with JPA, EclipseLink and Postgresql database. I can fetch data and display it as json in the browser with GET methods, however I am also presetting to write data (PO...
asked by 05.01.2017 / 12:57
1
answer

Validate date smaller than current date [closed]

My question is as follows. I have a JSP form for registering students with multiple attributes, one of them is the date of birth. Until then I was registering the date only by validating the format (dd / MM / yyyy) and with annotations. But now,...
asked by 17.11.2016 / 14:56
1
answer

Query with jpa + hibernate with more than one idt in clause

With hibernate I can do a query by idt as follows: entityManager.find(Empresa.class, idtEmpresa); And this would already return the mapped object of the enterprise class, but what if I wanted to query more than one idt, what would it look l...
asked by 22.10.2016 / 17:49
1
answer

Adding values of equal items in a table

I'm using JAVA, JPA, Wildfly and PrimeFaces, but I'd really like someone to help me in a java method to add up equal item values of a dataTable . I have two columns PRODUTO and QUANTIDADE , in the BORRACHA item there ar...
asked by 26.09.2016 / 16:42
0
answers

Problem with persisting relationship

I have 2 entities, the SubModel that has a list of possible options. I made a unidirectional OneToMany relation, when I do any persistence in the SubModel entity that the list of Options is empty Hibernate does quietly, but without having to inc...
asked by 07.10.2016 / 13:45
0
answers

JSF Download Archive Saved in the Bank

Hello, I have a jsf page where I load the data of a entidade , between the data there is an attached file (pdf, xls, jpg etc.). I would like you to click on the file name to download the file. If anyone can help in any way thank you. Me...
asked by 26.08.2016 / 16:40
1
answer

I can not download the dependencies of Hibernate and mysql #Algaworks

I am following the algaworks-ebook-java-ee-7-com-jsf-primefaces-e-cdi-2a-edicao-20150228 handout and in the financial project for the hibenate and mysql dependencies in pom xml I can not get the libraries and thus I can not annota...
asked by 14.07.2016 / 00:52
1
answer

How to read properties file to configure JPA?

I have a .properties file to set up the bank for my project. But I can not read the file. Does anyone give a force? EntityManagerProducer @ApplicationScoped public class EntityManagerProducer { private EntityManagerFactory factory; p...
asked by 09.08.2016 / 14:31
0
answers

JPAUpdateClause with Join

I have the following entities: @Entity @Getter @Setter @NoArgsConstructor @Table(schema = "MYDB", name = "TB_TESTE") public class Teste implements Serializable { @ManyToOne @JoinColumn(name = "CO_TIPO_TESTE") private TipoTeste tbT...
asked by 28.07.2016 / 19:40