Questions tagged as 'jpa'

1
answer

API Rest - Many to One

I am trying to create a one to many relationship, my problem is that when I make a request with the entity that has the ManyToOne this does not return anything is limited to giving me an error of Expected ':' instead of 'a' . The entiti...
asked by 16.09.2018 / 17:43
1
answer

How to implement the max and min in jpa, to obtain the maximum and minimum date?

I have the following query @NamedQuery(name = "findRegistroAccesoByNuserid", query = "select myRegistroAcceso from RegistroAcceso myRegistroAcceso where myRegistroAcceso.nuserid = ?1 and TO_CHAR(myRegistroAcceso.fecRegistroEntrada, 'dd/MM/yyyy...
asked by 24.03.2018 / 00:43
1
answer

HIBERNATE JPA POSTGRESQL, error in Persistence.xml

My persistence.xml file looks like this: <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:/...
asked by 09.01.2018 / 14:31
1
answer

Problem when linking two database tables with JPA?

Hello my problem is that I can not relate two tables that are one to many, simply by executing my code in netbeans the table without foreign shows the record well, but in which contains foreign key does not show simply limited to write where the...
asked by 10.11.2017 / 07:27
2
answers

Error with two persistence units: java.lang.RuntimeException: javax.annotation.processing.FilerException:

When compiling and executing in the IDE the application works well but when generating the jar it generates this error: An annotation processor threw an uncaught exception. Consult the following stack trace for details. java.lang.RuntimeExcept...
asked by 20.09.2017 / 03:25
1
answer

Error when trying to obtain records in a specific order

I'm trying to get the records in a specific order (the order of the calendar) based on an attribute called month using jpa, but I throw an exception and I do not understand why. This is my function: @Query("SELECT P FROM Periodo P WHERE P.l...
asked by 26.04.2017 / 23:09
1
answer

Lenar a JTable with JPA

I'm new to this JPA and I know almost nothing about it, although I've researched a bit, I still can not find a way to fill the table with the Entity , the code with which I do a DefaultTableModel and try to fill the table with this...
asked by 20.10.2016 / 22:14
2
answers

Entity listener does not run correctly in JPA

I'm having trouble running the listeners correctly in JPA. The project uses: JPA 2.1. EclipseLink 2.6.3 MySql 5.7.11 I have an author entity marked with the annotation OneToMany and orphanRemoval = true to the entity Book, when in...
asked by 16.06.2016 / 18:00
1
answer

Error when using OR in JPQL

I ask for your help to help me with a query I'm doing and return me an error. I have tried it with createNativeQuery and with createQuery , but it is generating error; the idea is that it receives a parameter and that it can do the...
asked by 31.05.2016 / 19:48
0
answers

Error with listing in my jsp using jpa

help I get this error and I do not know how I can solve it org.apache.jasper.JasperException: javax.el.MethodNotFoundException: Method getid not found my jsp where I try to list: <tr> <c:forEach items="${sue...
asked by 21.12.2018 / 01:16