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

Jpa criteria support in Hibernate ORM Panache #3965

Open
hantsy opened this issue Sep 11, 2019 · 6 comments
Open

Jpa criteria support in Hibernate ORM Panache #3965

hantsy opened this issue Sep 11, 2019 · 6 comments
Labels
area/panache kind/enhancement New feature or request

Comments

@hantsy
Copy link
Contributor

hantsy commented Sep 11, 2019

JPA Criteria is very important for developers. Hope add Spring Data like Specification to build query Criteria and provide variants of existed methods , eg. findAll(Specification, Sort).

@hantsy hantsy added the kind/enhancement New feature or request label Sep 11, 2019
@johnbanq
Copy link

In addition to that, can we come up with something like JHipster's entity filtering mechanism?
It allows you to write things like age.lessThan=10 in your query parameters and get it converted to criteria queries.
Not a big feature but I would say it is a nice addition

@loicmathieu
Copy link
Contributor

There are ongoing discussion in this area in the following issue: #2303

@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

emmanuelbernard commented Nov 18, 2019

In addition to that, can we come up with something like JHipster's entity filtering mechanism?
It allows you to write things like age.lessThan=10 in your query parameters and get it converted to criteria queries.
Not a big feature but I would say it is a nice addition

If I'm not mistaken, the entity filtering is really how to expose arbitrary query restriction via your REST endpoint, correct @johnbanq? I think it's akin to the simplification of the REST enndpoint

@emmanuelbernard
Copy link
Member

I agree with @loicmathieu I think the optional predicate will offer the same flexibility as specification and the same type safety once we plug the HQL resolver. I'd prefer we start with this approach before going on the heavyweight Specification approach Spring went to.

@hantsy
Copy link
Contributor Author

hantsy commented Nov 19, 2019

@emmanuelbernard yes, the flexibility is important. Another concern is the Java type-safe query, which is provided by JPA Criteria API.

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
Projects
None yet
Development

No branches or pull requests

6 participants