I have a model Category with a belongs to many relationship with itself:
- Category has many categories in
subcategories - Category belongs to one category in
supercategory
When I query all categories I get the correct results:
strapi.services.category.find()
When I query all subcategories I also get the correct results:
strapi.services.category.find({ supercategory_null: false })
But when I query just supercategories it doesn't return any categories:
strapi.services.category.find({ supercategory_null: true })
Question
How can I query just the categories that have no supercategory relationship?