Assuming I have a many-to-one relationship
class Author(model):
name = TextField()
class Book(model):
year = IntegerField()
author = ForeignKey(Author)
you can easily filter from the "many" side. Eg, keep only the books whose author satisfies some condition
books.objects.filter(author__name__like='...')
How can I, from the Author side, keep (for each author) only the books that satisfy a condition? Eg. is there something like
Author.related_filter(book__year__gt>1800)
that would produce something like
select * from
author join book on ...
where book.year > 1800
??