REST API filtering for relation with zero rows

System Information
  • Strapi Version: v4.0.6
  • Operating System: Ubuntu 22.04
  • Database: postgres
  • Node Version: v12.22.9
  • NPM Version: 8.5.1

Hi

I have one table called “resources”, which have 1-N relation to table “themes”.
I would like to create query to strapi, which will return me all resources, which doesn’t have any theme.
Something like this:

filters = {
themes: {
$null: true,
}
}

But this filter returns 500 server internal error which means the query is invalid.

Is there a way how to filter this?

Thank you