Questions tagged as 'hql'

1
answer

Hibernate - Dynamic Instantiation using factory

I know that using Hibernate Dynamic Instantiation I can instantiate an object according to a constructor. The Problem: I need to optimize the system as much as I can, and I'm done creating 5+ constructors in the same class. I want to know...
asked by 28.03.2016 / 16:12
1
answer

createQuery (HQL) returns NullPointerException when trying to perform LEFT OUTER JOIN

Personal speech, I'm having a problem trying to run an HQL in my application. HQL is basically this: select c.id, c.solicitante from <mypackage>.Exame c LEFT OUTER JOIN <mypackage>.Profissional prof Java code: hql = "sel...
asked by 25.02.2016 / 19:38
1
answer

How to get a value from a list

I need to get the value generated in the $ {stores.nmFrameLocator} field and give value display in the alert: storeMap () <script> function lojaMapa() { var tc = document.getElementById("dados-frame-resultado"); alert...
asked by 29.10.2014 / 15:01
1
answer

How to optimize Hibernate query

I'm developing a JAVA system and I use Hibernate to generate my queries with the bank. I need to solve the following problem: I have some classes that belong to an entity and I need to execute a method that returns me some fields of the class...
asked by 09.03.2018 / 18:01
1
answer

Doubt with Joins in HQL query

I have the following problem when performing a query in the HQL database The tabela1 table has approximately 20,000 records. The other tables have "N" records. The tabela1 table has relationships with the other tables t...
asked by 23.02.2018 / 17:45
2
answers

Attempting to search with specific id in a period

I'm trying to get a specific car between dates, because it works in periods, but I need to get the element ID, I do not know if I would have to apply some other query or include it, the database I use is SQL, case there is doubt I want to do...
asked by 21.12.2017 / 21:10
1
answer

Delete a Limit of Hibernate Records (Limit)

I'm migrating my WEB application to the Hibernate framework, however I have several SQL requests with very specific parameters. In one of these requests, I always need to include a new record in the database, delete the first 20...
asked by 10.11.2017 / 14:55
0
answers

Hibernate query (HQL) in Java with foreign key ... ERROR!

I need help with my code, I have two tables: -CDF (Employee Registry) CREATE TABLE public.cdf( ativo character varying(1) COLLATE pg_catalog."default", reg integer NOT NULL, nome character varying(30) COLLATE pg_catalog."default" N...
asked by 23.03.2017 / 22:12
1
answer

org.hibernate.PropertyNotFoundException: Could not find setter for sum on class Class

I'm trying to list the best selling products using SQLQuery (if anyone knows of other ways to perform such as eg using Criteria, Projections also supported) with Hibernate, org.hibernate.PropertyNotFoundException: Could not find setter for...
asked by 06.09.2016 / 20:18
1
answer

Error with unexpected token JPQL

I made a select JPQL but I'm having this error: Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: where near line 1, column 151 [select pes, pEnd from digifred.model.global.Pessoas pes, digifred.model.global.Pes...
asked by 12.01.2018 / 17:16