whenissummer
whenissummer

Reputation: 41

How to filter for un-empty array in CUBA Platform collection

I need to call a collection consisting of objects that have an un-empty array in the items (array) field, I filter collection like this:

filter:
conditions:[
{
              property: "items",
              operator: "notEmpty",
              value:null
            }]

but this solution doesn't work, 500 error is returned, how to implement it?

Upvotes: 0

Views: 137

Answers (1)

Vadim Basko
Vadim Basko

Reputation: 11

CUBA Platform REST API doesn't support filtration by collections (@OneToMany and @ManyToMany relations).

To implement such functionality you need to create and expose predefined JPQL query on back end.

There is similar discussion on CUBA Platform forum.

Upvotes: 1

Related Questions