Skip to content

Make Querydsl classes public to allow custom implementation #2266

@Sam-Kruglov

Description

@Sam-Kruglov

Hello, I have a need for a project to allow something more complex than Web QueryDSL, i.e. I need more operations than just "equals", like: ne, gt, lt, having OR clause etc.

The query language is actually documented over here on baeldung.

So, I decided to go with a single String parameter instead of the multi parameters like the default spring approach, i.e. ?query=country eq US and (city ne bla or state ne xx).

The problem I'm facing is that I started with defining my own QuerydslPredicateArgumentResolver, then my own QuerydslPredicateBuilder but I can't because I need QuerydslBindings#getPropertyPath as well as access to PathInformation to properly convert stuff into the required type. I don't really have to use QuerydslBindings but I'd like to take advantage of its features like excluding properties or creating aliases. For now, I decided to drop query DSL and go with Specifications from spring data.

Would you please consider opening up the things you think could be useful for my usecase? Or, perhaps, providing extension points if I want to have more search operations?

Please, have a look at this 3rd party project that does what I want by extending the default Spring approach but I decided not to go with it since it seems there's a lack of support. But you could have an idea from their approach as it doesn't conflict with the existing code unlike mine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions