Questions tagged as 'jpa'

1
answer

How to get the value bound to a selectOneRadio and assign it to an attribute in a Bean

I want to implement a method / way to get the value bound to a selectOneRadio (which is an Enum) and assign it to an attribute inside a Bean. After getting the value bound to selectOneRadio, I will pass it as a parameter to a method called ne...
asked by 13.09.2015 / 04:53
3
answers

Spring Data JPA does not recognize the SQL 'Limit' command?

I'm creating a REST API, using Spring Boot, which, using data from a table, displays random phrases. Giving a Google, I discovered that it is possible to generate random results through pure SQL: SELECT <coluna> FROM <tabela> OR...
asked by 31.10.2018 / 06:21
1
answer

Hibernate, force table name in low case

I am using Hibernate 5.2.1.Finally as implementation to handle MySQL database. The problem is that tables are being generated with the first letter in high box, I would force to be all in the box via file of persistence. Currently my file is thi...
asked by 16.08.2016 / 17:58
2
answers

What is the purpose of the "persistence.xml" file?

I am studying Hibernate , and on the way I came across several doubts, one of my doubts, and what is important for my learning, is about the purpose of the persistence.xml that is my unit of persistence, I read about it, however, I can...
asked by 06.04.2016 / 23:14
1
answer

How to change the default schema of postgresql in persistence.xml in a java application

I'm developing an application and I'm having a hard time changing the default application schema. I'm using PostgreSQL in a Java application with JPA and Hibernate as an implementation. persistence.xml <persistence-unit name="comu...
asked by 19.04.2014 / 23:38
1
answer

JPA make a join of a table that has attribute @manyToOne and @ManyToMany

I am having a question regarding table joins, I have a sales class the same as Customer, Buy, ProductList. I would like to make a report with product name, customer name, product value and date of purchase only I do not have the slightest idea h...
asked by 27.04.2018 / 19:23
1
answer

Mapping an enumeration

I have a problem with hibernate: When I try to give wakeup on the server, it gives me the following error message:    Use of @OneToMany or @ManyToMany targeting an unmapped class. Saying that I'm trying to use these annotations in an un...
asked by 16.12.2016 / 20:52
1
answer

Problems with the OpenSessionInViewer + JPA + Tomcat standard

Hello, I'm using Tomcat + JPA + Vraptor 4 and I'm using cdi to inject EntityManager as follows. EntityManagerFactoryCreator: public class EntityManagerFactoryCreator { @ApplicationScoped @Produces public EntityManagerFactory get...
asked by 28.07.2016 / 02:30
3
answers

How to insert records when starting the JSF + JPA system?

How do I insert pre-registered records into the system with jsf and jpa. I want it when the system starts the admin user is created.     
asked by 11.10.2016 / 19:41
2
answers

Close the entityManager after operations? How to manage?

I have been doing some courses and all the material I have read so far exemplifies the use of JPA / Hibernate in small examples, however, when we are developing something more concrete as a project, some questions arise. For example, before an...
asked by 29.03.2017 / 03:39