Questions tagged as 'hibernate'

2
answers

Make JPA name the tables in capital letters

I am using JPA with spring boot, hibernate and sql server, it works fine, but I would like the names of the tables and their fields in the database to write them in lowercase, how can I make it uppercase? This is how I have my properties:...
asked by 23.08.2018 / 19:29
2
answers

Problem when creating query using hibernate

I am making the following query: @Override public List<Estudiante> buscarEstudiantes() { Session session = getSession(); Query query = session.createSQLQuery("from Estudiante"); return query.lis...
asked by 01.04.2016 / 18:43
1
answer

Best way to modify (update) an object with Spring and Hibernate in this scenario?

I do not know how to move forward with this, to see if someone gives me a hand:) In the modal that I see in the image several loaded credentials will appear. Each credential can be edited or deleted and I'm having architectural problems...
asked by 03.12.2018 / 15:00
3
answers

Correct way to send data to a view with jpa spring framework

What is the best practice to send data to a view with Spring framework, it is correct to send an entity to a view or first convert an entity to a disc. This is because of the security issue, that not all the data in a table is necessar...
asked by 20.11.2017 / 22:40
1
answer

Combobox value is not assigned to the model class (Hibernate Validator)

I am trying to load values to a select (or asbobox) dynamically from server side with Spring Boot. I am also validating this form with the help of Hibernate Validator. I'm having a very annoying problem that I can not explain why it's happeni...
asked by 18.11.2018 / 23:36
2
answers

Carry a SELECT to a NAMED QUERY

I want to do the following SELECT but in a NAMED QUERY , I do not know if it's possible. SELECT DISTINCT (q1.code ||'/'|| q1.name) FROM ( SELECT c.code,c.name FROM USER c ) q1     
asked by 05.08.2016 / 16:53
1
answer

Query HAVING SUM () in HQL Query

I would like to use the following query that you make in MySQL: SELECT * FROM bdcsd.insumo GROUP BY bdcsd.insumo.Nombre_Insumo HAVING SUM(bdcsd.insumo.Stock_Actual) <= bdcsd.insumo.PDP; In a java class using Hibernate's HQL Query method...
asked by 19.07.2018 / 17:48
1
answer

LogIn HQL Can you compare an object with two variables?

The goal is to make a LogIn through an HQL, I am currently at this point of the code: public boolean LogIn(String nickname, String password){ boolean inAnswer = false; try{ inAnswer = true;...
asked by 17.04.2018 / 09:59
1
answer

org.hibernate.LazyInitializationException: could not initialize proxy - not Session Solved

if I have a class "City" and a "Person" each with its attributes but Hibernate in the class "Person" instead of int IdCity works with < strong> City getCity in the get and set and while adding an attribute of type Set Person > Person...
asked by 14.02.2018 / 23:17
1
answer

java.lang.NullPointerException in EntityManager

I'm starting to develop with Spring MVC and hibernate. The system is displayed correctly but I get the following error trace: Advertencia: StandardWrapperValve[dispatcher]: Servlet.service() for servlet dispatcher threw exception java.lan...
asked by 13.12.2017 / 23:27