Open-source project
querydsl/querydsl avatar
querydsl/querydsl

Querydsl: type-safe Java queries across JPA, SQL and MongoDB

Unified Queries for Java

4,969 stars878 forksJavaApache-2.0

At a glance

What is it?
Querydsl replaces inline SQL strings and externalized XML with a fluent Java API and ships one module per backend. Its own documentation leaves the version story open: the newest tag is from January 2024 while master moved in May 2026.
Who is it for?
Querydsl fits a Java codebase that already accepts a fluent query builder and wants one query shape across JPA, SQL, MongoDB and the in-memory collection modules. It does not fit a team that expects a support channel, a documented Spring Boot version, or database versions matching the prose.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 6 days ago.
What is it written in?
Mainly Java, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • querydsl/querydsl4,969 ★ · -2
Star history
Repository2026-09-232026-11-15
querydsl/querydsl5k5k

-2 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

A fluent chain replaces inline strings and externalized XML

Querydsl describes itself as a framework that builds type-safe SQL-like queries in Java, and the backends it names are JPA, MongoDB and SQL. The mechanism it replaces is specific rather than general: queries that would sit in inline strings, or get externalized into XML files, are assembled in Java through a fluent API, so the chain is checked by the compiler instead of being concatenated as text at runtime. What the top level file does not contain is any part of that chain. There is no sample entity, no query example, no dependency snippet with coordinates. A reader who opens the repository root has to leave it before writing a first query.

Seven hosted chapters, and no query example in the repository

The entry points are seven links into a hosted reference manual, one per backend: Querying JPA at ch02.html#jpa_integration, Querying SQL at ch02s03.html, Querying Mongodb at ch02s07.html, Querying Lucene at ch02s05.html, Querying Collections at ch02s08.html, Querydsl Spatial at ch02s04.html, and Querying JDO at ch02s02.html. All of them resolve to querydsl.com documentation rather than to files in a clone, so the syntax you copy is not versioned next to the code you build. Runnable projects sit one level down under querydsl-examples. The gap is the module list: querydsl-hibernate-search, querydsl-sql-spring, querydsl-guava, querydsl-kotlin and querydsl-scala have no tutorial linked from the top level, and the codegen side of the tree, querydsl-apt, querydsl-codegen, querydsl-jpa-codegen, querydsl-sql-codegen and querydsl-kotlin-codegen, gets no link either. Nothing in the top level file tells you how those connect to a build.

Building from sources means naming one Maven profile

Compiling the sources yourself takes one command and one placeholder to fill in:

bash
$ mvn -Pquickbuild,{projectname} clean install

The brace is not a shell variable; it stands for a Maven profile you substitute by hand, with jpa, sql and mongodb given as named examples and all offered as the catch-all. Behind that profile list sits a wide module tree: querydsl-core, querydsl-collections, querydsl-jdo, querydsl-lucene3, querydsl-lucene4, querydsl-lucene5, querydsl-spatial, querydsl-sql and querydsl-bom line up next to the jpa and mongodb directories. Ordinary use is not this command. Releases go out through public Maven repositories, and the Maven Central badge near the top of the file points at the com.querydsl/querydsl-core coordinates, which is the artifact an application pulls.

The compose file pins different engines than the prose names

The top level file promises a compose setup with Oracle Express Edition 11g, PostgreSQL 9.1.10, MySQL 5.5.34 and Cubrid 9.2. The compose file pins other numbers: mysql:5.6.38, mdillon/postgis:9.3-alpine for PostgreSQL, wnameless/oracle-xe-11g-r2:latest for Oracle, and lighthopper/cubrid:9.2.26.0004. Two more engines sit in the file without being named in the prose, mongo:3.6.1 and ibmcom/db2:11.5.0.0, and a gate service waits on a sqlserver service the prose never mentions. A reader who takes the version numbers at face value ends up with a JDBC URL and dialect expectations that the containers do not match. The missing MongoDB line matters most, since the mongodb module is one of the three backends the framework advertises, and db2 additionally runs with privileged: true.

PostgreSQL answers on host port 5433, not 5432

Starting the containers is one command, and the prose says all default ports are forwarded to the host machine:

bash
$ docker-compose up -d

The mappings are where that sentence stops being accurate:

yaml
  postgresql:
    image: mdillon/postgis:9.3-alpine
    ports:
      - "5433:5432"

MySQL publishes 3306, Oracle 1521, MongoDB 27017 and DB2 50000, while Cubrid needs five at once (33000, 30000, 8001, 8002 and 1523). The db2 service reads DB2INST1_PASSWORD, DB2INSTANCE=db2inst1, DBNAME=sample and LICENSE=accept from its environment. Readiness is handled by a block-until-healthy service on alpine:latest that depends on cubrid, db2 and sqlserver with condition: service_healthy, and the cubrid healthcheck runs csql demodb -c "SELECT 1" every 5s with a 60s timeout and a 60s start period.

Questions posted as issues are closed on sight

Support is routed away from the issue tracker deliberately. Free help lives in the repository Discussions area and under the querydsl tag on Stack Overflow, and the top level file says plainly: "Please do not post questions as issue. Such issues will be closed immediately." Contributors get a Slack workspace through an invite link, and changes arrive as pull requests; when the details of a contribution are unclear, the file points at the Querydsl Google Group or asks for a ticket. For a library whose hard part is often a generated query type that will not compile against your entity, that routing has a cost. No response time is stated, no escalation path exists, and no triage policy is written down, so a silent tracker is not evidence that anyone answered.

Newest tag is 5.1.0 while master moved in May 2026

Three tags show up in the release history: QUERYDSL_5_1_0 on 2024-01-29, QUERYDSL_5_0_0 on 2021-07-22, and the 5.0.0.M1 milestone on 2021-06-16, which preceded 5.0.0. The default branch is master and its last push was on 2026-05-28, and the repository is not archived. The build and coverage badges both point at master, which means the state those badges describe is not the state of the 5.1.0 artifact. An adopter therefore has a choice with no middle setting: take 5.1.0 from Maven Central and run code that has not changed since January 2024, or compile master and own whatever the unreleased tree holds. CHANGELOG.md sits at the root, and no link to it appears in the top level file.

Version compatibility is nowhere in the top level file

Several things a Java team normally looks for are absent. There is no Java version requirement, no Spring Boot version, no Hibernate version, and no note about the jakarta versus javax package split that a JPA module has to answer for. Licensing lives in LICENSE.txt under Apache-2.0 rather than in the file itself. The root also carries dist.sh, release.sh and a devops directory that the top level file never explains, alongside a querydsl-bom module that gets no mention in prose. The consequence is concrete: version compatibility, the first question anyone asks about a persistence layer, has to be answered from your own build logs, and nothing here warns you when the answer turns out to be no.

Editorial conclusion

Querydsl fits a Java codebase that already accepts a fluent query builder and wants one query shape across JPA, SQL, MongoDB and the in-memory collection modules. It does not fit a team that expects a support channel, a documented Spring Boot version, or database versions matching the prose. Before adopting, check two things against your own stack: the Hibernate and jakarta namespace story is written down nowhere on the top level file, and 5.1.0 from January 2024 is what Maven Central hands you unless you build master yourself.

Frequently asked questions

What is Querydsl?

A Java framework for constructing type-safe SQL-like queries through a fluent API instead of inline strings or externalized XML files. The backends it names are JPA, MongoDB and SQL, with tutorial links also covering Lucene, Collections, Spatial and JDO. It is published under Apache-2.0 and its default branch is master.

What is Querydsl used for?

Writing queries in Java source that the compiler checks, across several backends with one call shape. The stated backends are JPA, MongoDB and SQL, and the module tree adds querydsl-collections, querydsl-jdo, querydsl-lucene3, querydsl-lucene4, querydsl-lucene5, querydsl-spatial, querydsl-hibernate-search, querydsl-kotlin and querydsl-scala.

How do I use Querydsl?

The top level file links seven reference chapters on querydsl.com, one per backend, and points at the querydsl-examples directory for runnable projects. To build from sources, run `mvn -Pquickbuild,{projectname} clean install` with jpa, sql, mongodb or all as the profile name. Releases are also published to public Maven repositories under com.querydsl.

Is Querydsl dead?

The repository is not archived, and master had a push on 2026-05-28. The newest release tag, QUERYDSL_5_1_0, is dated 2024-01-29, so changes have landed on master since that artifact was published, while the build and coverage badges point at master rather than at a tag.

How can I use Querydsl in a Spring Boot application?

The top level file has no Spring Boot setup, no Spring Boot version and no dependency snippet. What it offers is a querydsl-sql-spring module in the tree, a com.querydsl/querydsl-core badge, and reference chapters for JPA and SQL. The application wiring is left to you.

What are some alternatives to Querydsl?

The top level file names none. It frames the choice as fluent Java query construction against the two things it replaces, inline SQL strings and XML files, then links tutorials for JPA, SQL, MongoDB, Lucene, Collections, Spatial and JDO.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. querydsl/querydsl on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/querydsl-querydsl.svg)](https://hysenlabs.com/projects/querydsl-querydsl)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/querydsl-querydsl.svg)](https://hysenlabs.com/projects/querydsl-querydsl)

Was this useful?