Questions tagged as 'hql'

1
answer

Grant value byte in a set

We have a DB with a User table that has a column of type Tinyint (Since it is a boolean) and we are working with Hibernate. My User model has a variable, autogenerated, Byte type to designate that user value (setters & getters). The fact is t...
asked by 20.04.2018 / 10:24
1
answer

Hibernate-Java query

Hi, I'm working on hibernate and I do not know much about the subject and I'm trying to get a query in hql, but as much as I'm looking for how to do it I can not find the way since it's a multitasking query between charge, assignment_cargo_instr...
asked by 09.08.2016 / 03:36
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

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

QuerySyntaxException: unexpected token: ON

When I run a query with the entity manager entityMan.createQuery(str.toString()).getResultList().size(); I get a syntax error org.hibernate.hql.ast.QuerySyntaxException: unexpected token: ON near line 1, column 534 [select catfiguras.FIG...
asked by 05.12.2015 / 04:03
1
answer

HQL excluding between tables

I need a pair of excludable Querys to check a "availability" factor within a db. It is worth the query so far I have been posing in various ways and I think, this is the most correct but I still give error from Usuario judge where judge...
asked by 24.04.2018 / 09:38
1
answer

HQL Queries (Hibernate)

I am starting to use the mapping tool Hibernate and in order to know and become familiar with this technology I am making some inquiries through HQL but I am not entirely sure if the approach I'm giving you is correct. Below I will presen...
asked by 26.11.2017 / 21:50
0
answers

Oracle query error

Hi, I have this query but I miss an error saying that parentheses are missing right: select to_char(trunc(fecha,'HH')+(30*round(to_char( trunc(fecha,'MI'),'MI')/30))/1440,'DD/MM/YYYY hh24:mi:ss') AS fecha, SUM(total) AS total from (S...
asked by 31.07.2017 / 20:32
2
answers

How to iterate or traverse an Object of the Object class that contains objects of different class inside it?

I have this query in hql: String lHql = " from Grupo g" + " join g.Persona p " + " join g.Animal a " + " where g.tipo= "A""; Query lQuery = pSession.createQuery(lHql); Object l...
asked by 23.12.2018 / 18:50