Questions tagged as 'jpa'

1
answer

Is it possible to obtain metadata from a query with JPA?

to obtain the data, I have no problem, I can read and manage them, for this I used: select * from MiTabla; And to read it: em = emf.createEntityManager(); Query query = em.createNativeQuery("select * from MiTabla"); List<Object[]&...
asked by 07.03.2017 / 09:52
1
answer

Problem with SQL query in Oracle [closed]

I have a system which performs the query of a product in a store. That is, in my interface I select todas and then I enter the product code and I should throw all the stores with that product available. The query I modified it for that pu...
asked by 14.11.2016 / 17:21
1
answer

mapping entities with jpa?

I'm new to jpa, what I've been trying is to map a table of my DB of the user table which is divided into 2 types, which are natural and legal users but legal persons have data of ruc and organization to which belongs public class Usuario imple...
asked by 05.04.2017 / 21:13
1
answer

Error using JPA

Well, my situation is as follows. I am working on a final project that I have to deliver tomorrow with a friend. We are working at par. I do not know what happened, from one moment to the next I get the error: Exception in thread "main" javax....
asked by 11.12.2016 / 14:32
2
answers

Delete user by ID

I have the following link <div class="col-md-8"> <a href="borrarUsuario/${session.userData.id}">Borrar Usuario</a> </div> This is the controller method that clears @RequestMapping(value="/borrarUsuario/{id}",me...
asked by 21.11.2018 / 09:00
1
answer

Hibernate, exception when doing update

I have an exception when calling an update () method of the UserService class, with the aim of updating a user's data stored in the db. UserService class: import java.util.List; import db.hibernate.dao.UserDao; import models.User; publi...
asked by 07.11.2018 / 23:32
1
answer

How to create classes for object / relational mapping?

I am new to hibernate and jpa, I have to create 3 classes User, Client and Attribute that will be mapped to tables, the classes have the following properties: User has: id, name, surname, password, many clients, many Attributes. Clien...
asked by 07.11.2018 / 14:29
1
answer

Hibernate + Abstract Classes

Following as regards my doubts about Hibernate is concerned. Let's say I have a database with the table asignatura . CREATE TABLE IF NOT EXISTS 'asignatura' ( 'id' int(11) NOT NULL, 'name' varchar(12) NOT NULL, PRIMARY KEY ('id') )...
asked by 17.08.2018 / 16:10
1
answer

IllegalArgumentException with JPA

I have this problem: SELECT monthname (h.i_date) AS m FROM History h where year (now ()) GROUP BY month (h.i_date) I execute this statement in mysql and there are no problems. But using JPA in java launches the second error: [33, 34] Th...
asked by 05.01.2018 / 17:22
1
answer

because this error: Creating bean whith name NameRepository, No property parameters found for type?

I have the following service public List<Factura> listFactura(String campo1, String campo2, String Campo3); and its implementation @Autowired private FacturaRepository repository; public List<Factura> listFactura(Str...
asked by 05.06.2018 / 06:08