Questions tagged as 'criteria'

1
answer

Count with Hibernate Criteria

I have two tables, Products and Sales Items In the sales items table I have an FK of products. I want to query using hibernate criteria. select count(itensvenda.prdcodigo), produtos.prddescricao from itensvenda inner join produtos on iten...
asked by 08.09.2014 / 05:22
1
answer

JPA Query Filtering by Entity List

I'm running a Java system using SpringBoot and JPA , being event management and I have two entities: Inscricao and HorarioAtividade . They have a Many To Many relationship, with my class Inscricao having a list of...
asked by 04.07.2018 / 17:07
1
answer

Join multiple fetch returning duplicate JPA Criteria API values

In the method in question I want to return the query with the joins of employee and company. However, the Company class is related to the Query and to the Employee, and is returning duplicate in the JSON. Query class @Entity @Table(name="CO...
asked by 04.04.2018 / 20:44
2
answers

Specification with Spring Data Jpa passing null parameter

I'm using Specifications Spring Data JPA, but I'm having a hard time! By not passing any parameters in the two fields I want it to return all records to me. But when doing the query it is returning me only those that have the respective two null...
asked by 28.02.2018 / 13:50
0
answers

Doubt Criteria

Can I create a critéria with an entity that is not mapped to another entity? Or do I have to use a native query to do this query? I have a user entity and another product but I do not have product relationship with user but I have to bring th...
asked by 17.10.2017 / 17:16
0
answers

Integration test send email [closed]

Today I have a system that sends multiple emails. Many settings and submission rules. I need to add some 50 new rules, new emails Time formats with attached file, images, and more. As it is today, I use an email server to authenticate...
asked by 26.01.2017 / 18:20
0
answers

How to compare the day of a LocalDate in CriteriaBuilder

I have an entity that has a LocalDate field. @Entity @Table(name="feriado") public class Feriado implements Serializable{ private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = Generatio...
asked by 19.10.2016 / 22:00
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
0
answers

Query using Firebird's SUBSTR with linq, queryOver, Criteria

Well, I need to create a query using the firebird "SUBSTR" function with linq, queryOver, or Criteria. I have option to create with HQL or SQL, but these would be my last options. Does anyone have an idea? Here is an example of the query. S...
asked by 10.05.2016 / 19:33
1
answer

Doubt about Hibernate Criteria

I'm trying to make a work order system just for me to train. In work orders I can have several categories. And my doubt is when it is time to display, for example, a ranking of the most used categories for a period x using criteria of hiberna...
asked by 13.03.2016 / 05:09