turkraft / springfilter

Dynamically filter JPA entities and Mongo collections with a user-friendly query syntax. Seamless integration with Spring APIs. Star to support the project! ⭐️
https://turkraft.com/springfilter
221 stars 37 forks source link

Query in relations #375

Closed pedrammehrdad closed 6 months ago

pedrammehrdad commented 6 months ago

I want to list companies that give all employees a salary of more than 3000. The first thing that comes to mind is to write a filter like the following: employees.salary >3000 but this will list companies that have a salary of more than 3000. so I changed the query to the following: employees.salary >3000 and not(employees.salary < 3000) This is also not working as expected. Is there a way to achieve this?

torshid commented 6 months ago

This should do the job: not exists(employees.salary < 3000)