Query filters - filtering out objects with references

Hi @DudaNogueira, thanks for your reply.

  • I have set up a class for ‘Dish’ and another class for ‘Ingredient’, and I am using a two-way reference to link them together. Here’s how my classes are set up:
    • Class: Dish
      • name: [“text”]
      • description: [“text”]
      • ingredients: [“Ingredient”]
    • Class: Ingredient
      • name: [“text”]
      • description: [“text”]
      • dishes: [“Dish”]
  • I am struggling to work out how to use filters to exclude ‘disallowed’ ingredients. I’ve tried to explain that in my post above.

Say I have these objects in my database:

  • Dish 1 [ID: dish1]:
    • name: Spaghetti Bolognese
    • ingredients: [“ingredient1”]
  • Dish 2 [ID: dish2]:
    • name: Mushroom Pizza
    • ingredients: [“ingredient2”]
  • Ingredient 1 [ID: ingredient1]:
    • name: Beef
    • dishes: [“dish1”]
  • Ingredient 2 [ID: ingredient2]:
    • name: Mushroom
    • ingredients: [“dish2”]

I want to do a query for ‘dish’ objects that exclude the ingredient with ID “ingredient1”. As I said above, it doesn’t look like there is a query filter for this.

Am I missing something? If I am, could you send through an example of how I could achieve this?

Thanks again for your help.