Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support QueryDSL in Panache #4016

Closed
hantsy opened this issue Sep 14, 2019 · 15 comments
Closed

Support QueryDSL in Panache #4016

hantsy opened this issue Sep 14, 2019 · 15 comments
Labels
area/panache kind/enhancement New feature or request triage/wontfix This will not be worked on

Comments

@hantsy
Copy link
Contributor

hantsy commented Sep 14, 2019

QueryDSL is very popular in developer communities, as an alternative of JPA APIs, it is better to add it in Quarkus.

@stale
Copy link

stale bot commented Nov 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you!
We are doing this automatically to ensure out-of-date issues does not stay around indefinitely.
If you believe this issue is still relevant please put a comment on it on why and if it truly needs to stay request or add 'pinned' label.

@stale stale bot added the stale label Nov 13, 2019
@maxandersen maxandersen removed the stale label Nov 13, 2019
@emmanuelbernard
Copy link
Member

Optional predicates #2303 and type safe HQL might be a good replacement for QueryDSL. We looked at QueryDSL but it does not seem to be maintained anymore, that's why we hesitated to invest in it. If you can be a bit patient, let's see if the solution ^ solves your problems. Or you can try and contribute QueryDSL to Quarkus.

@kivan-mih
Copy link

Optional predicates #2303 and type safe HQL might be a good replacement for QueryDSL. We looked at QueryDSL but it does not seem to be maintained anymore, that's why we hesitated to invest in it. If you can be a bit patient, let's see if the solution ^ solves your problems. Or you can try and contribute QueryDSL to Quarkus.

querydsl/querydsl#2459 (comment)
As this post suggests QueryDSL is again maintained by a small team separate from the previous owner, however, the assumption that they would succeed is fragile.

Personally, my benefit from Querydsl was build-time query checking and IDE code completion. I used it as a plugin for Spring Data (example here https://www.logicbig.com/tutorials/spring-framework/spring-data/query-dsl-basic.html), and it was awesome. But Querydsl is not a must have, If some other instrument will give me the same benefits and will be easy to use, I will deffinitely go for it.

Also, type-safe querries in Quarkus could be a good move in competition with Micronaut, since IMHO for now, they have better storage integration options.

@geoand
Copy link
Contributor

geoand commented Feb 26, 2024

@FroMage I assume that with the latest improvements in Hibernate plus your work to integrate them in Quarkus, we can close this as won't do?

@FroMage
Copy link
Member

FroMage commented Feb 26, 2024

Yes.

@FroMage FroMage closed this as completed Feb 26, 2024
@FroMage FroMage added the triage/wontfix This will not be worked on label Feb 26, 2024
@kivan-mih
Copy link

Yes.

Could you give me a link to the manual describing functionality of typesafe queries in Quarkus which makes Querydsl feature request obsolete?

@hantsy
Copy link
Contributor Author

hantsy commented Feb 27, 2024

@geoand QueryDSL provides type safe API, it is good for IDE support and get the QL error at code time, but HQL we have to compile it(and even run it) and know where is wrong.

@FroMage
Copy link
Member

FroMage commented Mar 1, 2024

https://docs.jboss.org/hibernate/orm/6.4/introduction/html_single/Hibernate_Introduction.html#generated-query-methods

These are checked at compile-time and will get you IDE errors, and even completion for some IDEs

@kivan-mih
Copy link

https://docs.jboss.org/hibernate/orm/6.4/introduction/html_single/Hibernate_Introduction.html#generated-query-methods

These are checked at compile-time and will get you IDE errors, and even completion for some IDEs

It does not provide type safe queries checked in compile time as I understand. Another big issue is that they are not composable. QueryDSL solves all these two problems.

@FroMage
Copy link
Member

FroMage commented Mar 1, 2024

Well, the problem is that it's not clear if QueryDSL is still maintained. But there's nothing stoping anyone from writing a QueryDSL extension or support in Quarkiverse. That'd be awesome. We're not going in that direction for ORM/Panache, but that doesn't mean QueryDSL has no place in Quarkus, if you all want it, we'll help you build the extension.

@hantsy
Copy link
Contributor Author

hantsy commented Mar 4, 2024

@FroMage QueryDSL has just released a new version this year, https://github.com/querydsl/querydsl/releases/tag/QUERYDSL_5_1_0

@FroMage
Copy link
Member

FroMage commented Mar 12, 2024

Ah, this was not reflected in their website.

@dlmiles
Copy link

dlmiles commented Apr 4, 2024

QueryDSL 5.1.0 from Jan 2024 does not support jakarta.* namespace, is very Maven centric, so no working Gradle examples or support plugins, official documentation or examples from the source. There is Kotlin support but I was not able to get it working without error in a 4 hour evaluation of suitability for my project.

I have evaluated the project fork over at https://github.com/openfeign/querydsl which might address some on these matters, but I did not find it compelling to continue spending time on evaluating QueryDSL.

Time to evaluate Panache.

Hibernate used to have a useful and manageable Criteria API of its own but design by JPA committee seems to have struck that feature (it is now removed) and transformed it into the abomination it has become. So looking for a DSL so it never needs to be used directly by the programmer and regular kinds of queries need fewer lines of code.

@hantsy
Copy link
Contributor Author

hantsy commented Apr 5, 2024

Personally I like QueryDSL/JOOQ like type safe API when assembling complex queries, JPA Criteria API is a little tedious.

Panache uses literal text instead of type safe Java/Kotlin API, I do not like this approach, without IDE support, we have to determine the correctness of syntax by compiling/running the application.

@hantsy
Copy link
Contributor Author

hantsy commented Apr 5, 2024

@dlmiles It seems https://github.com/OpenFeign/querydsl is updated to the latest spec/frameworks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/panache kind/enhancement New feature or request triage/wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

8 participants