Reputation: 4306
How to get list of objects who has foriegn key in another model
Ex:
class A:
field1
field2
class B:
field1 = fk to A
field2
i want to get the list of objects of class A who has fk objects present in class B. i dont want to get objects for class A whose fk is not available in class B. And is it possible to get in one query?
Upvotes: 0
Views: 24