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
0
votes
0 answers

How to search JPA QueryDSL date with yyyy-MM-dd format?

I am learning SpringBoot JPA's and I am trying to search a database by adding "creationDate=2022-02-02" as a parameter to my uri call. JPA automatically formats the date with a timestamp as "Wed Feb 2 00:00:00 CDT 2022". However, the dates in the…
0
votes
0 answers

QueryDSL (Spring+JPA) Limit/Offset when using Transform

I am trying to use QueryDSL to transform a Many to Many select into a projection while also applying pagination using JPA. I have the following entities: @Getter @Setter @Entity public class Movie { @Id @GeneratedValue private Long id; …
Ivan Denchev
  • 426
  • 2
  • 11
0
votes
0 answers

QueryDsl parse JsonArray into JsonObject before updating Json column

I'm now using MySQL 5.7.35 version. I added implementation("com.vladmihalcea:hibernate-types-52:1.0.0") into gradle, and set entity field 'data' into type 'JsonArray'. @Entity @Table(name = "json_data") @TypeDef(name = "json", typeClass =…
0
votes
1 answer

Spring data jdbc and querydsl calls in one transaction do not work

I'm using spring-boot-starter-data-jdbc and infobip-spring-data-jdbc-querydsl-boot-starter(5.4.2) together. In my tests with org.springframework.transaction.annotation.Transactional annotation I have the following code: @Transactional void test() { …
user3435425
  • 192
  • 1
  • 18
0
votes
0 answers

I can't figure out the casting of date types and time zones

I have a Java application. To search by dates, I use the following technologies: JPA, and QueryDSL. The search is like this: if (nonNull(params.getPlanned_date_from()) || nonNull(params.getPlanned_date_to())) { …
0
votes
1 answer

Elasticsearch top_hits aggregation result and doc_count are different

Query GET /someindex/_search { "size": 0, "query": { "ids": { "types": [], "values": ["08a2","08a3","03a2","03a3","84a1"] } }, "aggregations": { "498": { "terms": { "field":…
nkhcode
  • 87
  • 1
  • 8
0
votes
2 answers

Kotlin Querydsl: cannot find javax.annotation.proceesing.Generated

I am following this example https://felixzett.com/articles/minimal-maven-kotlin-querydsl-example/ to implement querydsl in a Springboot Kotlin Maven project. Using the pom mentioned, I managed to generate the q classes after running mvn compile and…
yingxuan
  • 95
  • 3
  • 6
0
votes
0 answers

querydsl fetchJoin() is not working with entity has self relationship

This is my entity category @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "category_id") private Long id; @Column(unique = true) private String name; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name =…
rura6502
  • 365
  • 2
  • 15
0
votes
1 answer

How to filter records using Boolean Builder Spring Boot

JSON of my code: { "webId": 1713, "updateDate": "2021-10-05 09:51 AM", "createdDate": "2021-10-05 09:51 AM", "clientId": 1301, "createdBy": null, "updatedBy": "ABC", "createdById": 1713, …
Hamza ATIF
  • 37
  • 1
  • 9
0
votes
1 answer

QueryDsl reduce expression stream

Here my stream of querydsl expressions: Stream.of( Pair.of(QPatient.patient.name.any().given, Optional.ofNullable(given)), Pair.of(QPatient.patient.name.any().family, Optional.ofNullable(family)) ) .filter(pair ->…
Jordi
  • 20,868
  • 39
  • 149
  • 333
0
votes
1 answer

SpringBoot 2.6.1 incompatibility with Querydsl Mongodb?

I'm upgrading a Java 11 (SpringBoot 2.4.1) application to Java 17 and Spring 2.6.1. While using SpringBoot 2.4.1, I had these dependencies: org.springframework.boot
Nicolas
  • 1,812
  • 3
  • 19
  • 43
0
votes
0 answers

QueryDSL - hierarchical entities

Is there a way to force initialization of the following structure? class Dataset { private Dataset parent; private String name; } QDataset.datasetEntity.parent.name.isNotNull(); // parent == null, NullPointerException I assume complete…
michelson
  • 686
  • 9
  • 22
0
votes
1 answer

How can I test update using querydsl?

I'm trying to test update using custom repository with querydsl. But it fails because the data is not updated. I tried flushing after I call repository function, but it did not work. I think it is related with some kind of Entity manager problem,…
jhlee
  • 1
0
votes
1 answer

Not able to generate querydsl Q classes with Azure CosmosDB because @Entity annotation is not present

I am just trying to do a POC using spring boot data jpa along with Azure CosmosDB and query dsl. My plugin in pom.xml looks like this where I am using com.querydsl.apt.jpa.JPAAnnotationProcessor Annotation processor which is supposed to scan files…
0
votes
1 answer

Querydsl and unexpected end of subtree

It seems that that query is composed in the right way. SomeId exists. However, I'm getting the following errors: :0:0: unexpected end of subtree Invalid path: 'Entity.id' Invalid path: 'Entity.code' left-hand operand of a binary operator was…
Jarvis
  • 384
  • 2
  • 6
  • 18