Questions tagged as 'jpql'

0
answers

Problem in left join JPA - JPQL

   Exception in thread "main" javax.persistence.EntityNotFoundException:   Unable to find CNPJ with id 00001388000307 Reading the documentation, I saw that this exception is thrown when it tries to access (by the getReference method o...
asked by 13.10.2017 / 19:37
2
answers

How to Order List (Hibernate)

How can I sort a List with java and Hibernate? I have an abstract class with this method public List<T> listarContas(String where) { String consulta = "FROM " + entityClass.getSimpleName()+ " where "+ where; Query query = getE...
asked by 02.05.2017 / 16:28
2
answers

Hibernate JPQL for multiple likes

I'm using hibernate in my project and I'm not sure whether to use multiple dynamic likes in the search. I have a simple field on the page where the client can enter the name of a user, but I need to be able to enter 2 names if necessary to re...
asked by 06.01.2016 / 19:49
1
answer

Error in JPQL query

When I am starting my server, the following unexpected token error is occurring: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IServidorMensalRepositorio': Invocation of init method failed; nest...
asked by 05.05.2015 / 21:54
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

Query in JPQL for insertion of Data

How can I insert data with JPQL containing values: @Query("insert into user values()") User insertUser(); Data:     username     emailUser     
asked by 16.08.2016 / 17:40
1
answer

Group_concat in JPQL

I created the following query: SELECT o.codigoChamado, o.codigoOrcamento, group_concat(o.conteudoOrcamento), o.observacaoOrcamento FROM Orcamentos as o group by o.codigoChamado, o.codigoOrcamento, o.observacaoOrcamento order by o.codigoOrc...
asked by 10.10.2018 / 16:29
1
answer

OneToMany mapping with associative table with HIBERNATE - JPA

I need to map Hibernate from a 1:N relation to two tables, but there is an associative table that has the ids of the other two tables as columns. Example: The Servicos table can have many Itens and each item can only b...
asked by 21.08.2018 / 18:59
1
answer

JPQL Not recognizing the parameter

I need to perform a query using JPQL or Spring-date keyword method. The problem is that the parameter entered in the query is being ignored, I still can not identify the cause of it. As the findByDescricão method is ignoring the parameter (de...
asked by 24.04.2018 / 10:35
1
answer

jpaRepository + JPQL + JOIN

I have query down running in my code but using the actual names of the table and fields, the same structure below works, but how do I do the same but using the JPQL language, I am using names generic table and fields just to make i...
asked by 19.04.2018 / 21:15