[Django]-Filter for elements using exists through a reverse foreign key relationship

5👍

I’m pretty sure this is your query:

cats = Cat.objects.filter(person__name='bob', person__role__name='owner')

read here about look ups spanning relationships

👤dting

Leave a comment