Questions tagged as 'jpa'

0
answers

Select item in JCombobox and return associated value in JTextField in JPA

I try several times in a Swing form so that when selecting the option in the JCombobox the column item value of the same row appears in the JTextField. Once I was able to do this logic however it was with JDBC and some functions that I used for...
asked by 09.04.2017 / 04:56
1
answer

Search using two parameters in the JPA

Good evening everyone, I am bundled here in a logic, I made the DAO for all the CRUD of my project only in that it will not only have the search by the ID and also I am trying to do some method that searches the request by the ID and also by the...
asked by 05.04.2017 / 23:54
1
answer

How to Insert List with JPA

Good afternoon! I'm doing a web service that gets a Json from the application, unencapsulates and inserts into the database. I can decode normally, the problem occurs at the time of inserting the data into the database. I have a list insid...
asked by 27.03.2017 / 21:43
1
answer

Hierarchical selects. Parent-child relationship in the same table

I have a Product Entity with @ManyToOne. And I need to bring the last child record of each parent. I made a select in the table and it is bringing what I need but I am not sure to do the same query with hql. This is my select in mysql: SELE...
asked by 16.03.2017 / 17:28
1
answer

Edit Record Using Jpa

Good morning Personal, I'm trying to edit registry. Well the scenario is the following I have my edit screen that is bringing me the data Correctly. However when I do the editing it updates on the screen more in the non bank. I ha...
asked by 23.02.2017 / 14:53
0
answers

Saving Dynamic Data in the Same Java Entity

I'm using Spring MVC, thymeleaf and for me with all built routes it did automatic but not working, entity, repository, controller and etc. I have a relationship of N = N of course to shift, from that relationship created the course table to t...
asked by 21.02.2017 / 12:39
2
answers

Creating XML file with Search for a given user in the table using forEach jpa java

Good morning !! My personal doubts are as follows I have two tables one Person and one Employee. I'm making a for both tables to be able to create an Xml file, however since I'm not returning the results by Id and yes by the order of th...
asked by 21.02.2017 / 15:16
2
answers

Exception solution ServiceException and Failed to execute goal org.codehaus.mojo: exec-maven-plugin: 1.2.1: exec?

The following error occurred:    ServiceException and Failed to execute goal org.codehaus.mojo: exec-maven-plugin: 1.2.1: exec? I have already changed the provider name of org.hibernate.ejb.HibernatePersistence to org.hibernate.jpa.Hibern...
asked by 19.03.2017 / 11:11
1
answer

Hibernate - Set key foreign object without fetching object. Direct by Id

Does anyone know if it is possible for me to set an object that is foreign key if I have to fetch it. That is, just setting the direct id? Example: low.CompanySet (daoCompany.searchPorId (new Long (rsBeixa.getString (6)))); way you'd...
asked by 20.02.2017 / 21:41
0
answers

Create a JPQL and set the entity at runtime

Good evening. I would like to know if there is a way to do a JPQL query and set the entity at runtime, without having to concatenate or interpolate String. Example using interpolation: public long getRecords(String entity){ String q...
asked by 05.02.2017 / 04:10