Build JPA queries with JSON
{
"filter": [
{ "$or": [
{ "sequence": { "$gt": 0 } },
{ "sequence": { "$eq": -10 } }
{ "sequence": { "$eq": -20 } },
{ "$and": [
{ "sequence": { "$gte": 50 } },
{ "name": { "$eq": "John" } },
]}
]},
{ "surname": { "$lk": "%son" } }
],
"page": 0,
"pageSize": 10,
"sort": [
{ "sequence": "ASC" }
]
}
Please note that the "root" filter element is implictly and AND
container.
Thanks for the idea to Narmer23.
Thanks for the support to Narmer23 and sandrotaje.