Code Monkey home page Code Monkey logo

Comments (3)

torshid avatar torshid commented on May 28, 2024

That's an interesting use case. You can't do that with the size function as JPA expects a collection expression and you are providing a predicate (bool) expression. There is actually a subquery going on here, not sure how to handle it. The CriteriaBuilder's count method may be used somehow, I will try to think about it. Feel free to contribute (the class handling functions is not very well written, sorry for that).
https://github.com/turkraft/spring-filter/blob/2ff8818899341b10f2f2ac583a93e1f3bacfec05/src/main/java/com/turkraft/springfilter/node/Function.java#L104-L105

from springfilter.

torshid avatar torshid commented on May 28, 2024

I just read the issue again, and the statement find every car with at least 4 wheels with a diameter >=10 should be equivalent to /car?filter=size(wheels) >: 4 wheels.diameter >: 10.

Not sure it completely solves the issue though.

from springfilter.

torshid avatar torshid commented on May 28, 2024

I have added support for the exists function. It may possibly answer this issue.

Closing for now.

from springfilter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.