I have the following model in Django:
class Feedback(models.Model):
solution=models.ForeignKey(Solution, related_name='solution1')
idea=models.ForeignKey(Idea,null=True, blank=True,related_name='idea1')
idea2=models.ForeignKey(Idea, related_name='idea2')
Given the ID of a solution how can I write a query that would retrieve me all ideas2 that have been in the feedbacks with this solution. And I am wondering is it even possible in Django. Thanks a lot!
I tried something like this, but how can I specify that I am looking for idea2, not idea1?
ideas2= Idea.objects.filter(feedback_solution1=solutionID)
Or
Check out the Performance considerations section in the Documentation.