Questions tagged as 'hql'

1
answer

Differences between Criteria and HQL

In the handouts I read and tutorials I followed Criteria is more used, however I identified myself more with HQL . But I have the following doubt, everything done with Criteria can do with HQL ? HQL example: //Sele...
asked by 04.08.2015 / 17:02
1
answer

Create Dto by the constructor with a List parameter of a Hibernate entity

I have a @Query Spring, which performs a query to the bank by an Entity, to create some DTO Objects. And the properties of this DTO object, I passed via Builder, but I needed to pass as a parameter on the List constructor it has in the Ent...
asked by 14.11.2014 / 20:52
1
answer

Return values for all months of the year by drawing per month

I have the following SELECT: SELECT coalesce(sum(vs.total), 0) FROM tabela_exemplo t WHERE extract(year from t.data_entrada) = extract(year from current_date) GROUP BY extract(month from t.data_entrada); What returns the following result:...
asked by 20.10.2015 / 21:13
1
answer

HQL query in C #

Well, I'm having difficulties with HQL and C #. I have the following method: public IList<int> GetListYear(Guid educationalInstitutionId, Guid academicLevelId, Guid? locationId, Guid? programOfferedId) { //Implementar o HQL } And...
asked by 05.06.2015 / 15:44
1
answer

HQL query with list of ENUM as parameter

Hello, I have the following problem, here is an example: I have an entity Banda that has as attribute a list of genres List<Generos> generos , Generos is an ENUM with the following values: ALTERNATIVE_ROCK("Altern...
asked by 31.12.2014 / 03:43
2
answers

I need to do a SUM within Group BY in Lambda

I'm trying to create a summary report where it consists of doing GROUP BY with SUM , I want to know how I could do this in C # with lambda or hql (Nhibernate), I was able to do a GROUP BY, but I can not puts SUM, an example of what...
asked by 02.02.2018 / 17:28
1
answer

How to perform a query in HQL in C #?

I need to create an HQL query inside a C # method. The structure looks something like this: I have the method: IList<int>GetListYear(Guid educationalInstitutionId, Guid academicLevelId, Guid? locationId, Guid? programOfferedId) { //I...
asked by 11.06.2015 / 17:03
1
answer

SQL function with mySQL

I'm implementing a function for a vendor search field and my sql function is in trouble, would anyone know which problem? This was a function of when I used postgree, but now I'm using mySQL. package br.com.project.bean.geral; import java.la...
asked by 14.06.2018 / 04:29
1
answer

How to do in HQL a query by ID using the LIKE operator?

How do I do this query in HQL? select * from entidadeQualquer where id::text like '%12'; I've tried the code below but it did not work: select c from entidadeQualquerc where c.id like '%12';     
asked by 16.02.2018 / 20:36
1
answer

Executing Query with SUM in HQL?

I'm trying to use SUM to add an attribute of an entity using HQL of NHibernate , but every time I run query returns empty. I'm following the example here but I still could not do it. How to do this? I'm trying...
asked by 05.10.2016 / 12:41