Questions tagged [querydsl]

Querydsl is a framework which enables the construction of type-safe SQL-like queries for multiple backends including JPA, MongoDB and SQL in Java.

Querydsl is a framework which enables the construction of type-safe SQL-like queries for multiple backends including , and in .

Instead of writing queries as inline strings or externalizing them into XML files they are constructed via a fluent API.

1985 questions
114
votes
2 answers

What is the difference between must and filter in Query DSL in elasticsearch?

I am new to elastic search and I am confused between must and filter. I want to perform an and operation between my terms, so I did this POST /xyz/_search { "query": { "bool": { "must": [ { …
Krash
  • 2,085
  • 3
  • 13
  • 36
54
votes
4 answers

Dynamic spring data jpa repository query with arbitrary AND clauses

I'm using Spring data jpa repositories, Got a requirement to give search feature with different fields. Entering fields before search is optional.I have 5 fields say EmployeeNumber, Name, Married,Profession and DateOfBirth. Here i need to query only…
Mr.Chowdary
  • 3,389
  • 9
  • 42
  • 66
45
votes
1 answer

Creating multiple aliases for the same QueryDSL path in Spring Data

I have a generic Spring Data repository interface that extends QuerydslBinderCustomizer, allowing me to customize the query execution. I am trying to extend the basic equality testing built into the default repository implementation, so that I can…
woemler
  • 7,089
  • 7
  • 48
  • 67
39
votes
7 answers

Spring Data JPA and Querydsl to fetch subset of columns using bean/constructor projection

I have an entity class as below: @Entity public class UserDemo implements Serializable { @Id private Long id; private String username; private String createdBy; @Version private int version; /*** * * Getters…
Murali
  • 3,412
  • 5
  • 36
  • 34
34
votes
4 answers

Comparing Querydsl, jOOQ, JEQUEL, activejdbc, iciql and other query DSLs

Can someone point me to some resources about the performance comparison among the different Query DSL libraries available for using with Java, like: Querydsl, jOOQ, JEQUEL, activejdbc, iciql and etc... Background: I m using Spring JDBC template, but…
manikanta
  • 8,100
  • 5
  • 59
  • 66
33
votes
3 answers

Can Spring Data REST's QueryDSL integration be used to perform more complex queries?

I'm currently building a REST API in which I want clients to easily filter on most properties of a specific entity. Using QueryDSL in combination with Spring Data REST (an example by Oliver Gierke) allows me to easily get to 90% of what I want by…
28
votes
3 answers

Spring Data JPA - Specifications and Querydsl

I'm trying to integrate QueryDSL to my existing project with Spring Data, I've tried different samples and now I've decided to stick to this one Advanced Spring Data JPA - Specifications and Querydsl. Problem: when I run the project as Maven…
M.Octavio
  • 1,780
  • 2
  • 25
  • 39
27
votes
1 answer

Elastic query DSL: Wildcards in terms filter?

I am trying to filter the documents using terms filter. I am not sure how to introduce wildcards in filter. I tried something like this: "filter":{ "bool":{ "must":{ "terms":{ "wildcard" : { …
Mohitt
  • 2,957
  • 3
  • 29
  • 52
26
votes
9 answers

Eclipse issue with Maven build and JDK when generating Qclasses in Querydsl

When I add this code below in my pom.xml to support Querydsl com.mysema.maven apt-maven-plugin 1.0.6
Hayi
  • 6,972
  • 26
  • 80
  • 139
21
votes
7 answers

Generating JPA2 Metamodel from a Gradle build script

I'm trying to set up a Gradle build script for a new project. That project will use JPA 2 along with Querydsl. On the following page of Querydsl's reference documentation, they explain how to set up their JPAAnnotationProcessor (apt) for Maven and…
dSebastien
  • 1,983
  • 2
  • 21
  • 31
21
votes
1 answer

How to add Query Hints to spring data jpa querydsl queries?

I'm using Spring Data JPA 1.7.1 I was trying pass query hints (e.g. for Hibernate query caching) to queries when using the querydsl methods of the standard Spring Data repositories, as defined in the QueryDslPredicateExecutor interface, e.g.…
Nazaret K.
  • 3,409
  • 6
  • 22
  • 31
20
votes
4 answers

Spring Boot & JPA: Implementing search queries with optional, ranged criteria

This is an SSCCE, shows research, isn't a dupe and is on topic!!! Spring Boot REST service and MySQL here. I have the following Profile entity: @Entity @Table(name = "profiles") public class Profile extends BaseEntity { @Id …
smeeb
  • 27,777
  • 57
  • 250
  • 447
20
votes
1 answer

The difference between com.mysema.query and com.querydsl?

I am a newbie in querydsl. I saw two types of querydsl implementations. Is there any differnece? I already developed with com.mysema.query implementation. But I think I went wrong way. Please explain about this.
verystrongjoe
  • 3,831
  • 9
  • 35
  • 66
19
votes
1 answer

QuerydslPredicate and generic class

I have many controllers with same methods, difference is only entity class. I want to create generic BaseController and having problem with QuerydslPredicate annotaion (cannot set root, this is generic) class abstract BaseController
Yura Heineken
  • 255
  • 1
  • 10
19
votes
5 answers

How can I convert a spring data Sort to a querydsl OrderSpecifier?

This is basically the opposite of this: How to do a paged QueryDSL query with Spring JPA? This is for a custom query for which i can't use any of the findAll() methods. EDIT: Posted the wrong link. Now corrected.
beginner_
  • 7,230
  • 18
  • 70
  • 127
1
2 3
99 100