You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this comment model that i need to get all the parent comments and their children, then prefetch it to my main queryset, this is what i got so far:
now the problem is when i call the one of my parent comment children -> qs[0].parent_comments[0].children.all() then it calls queries again.
Can you help me how can i fix that?
The text was updated successfully, but these errors were encountered:
I have this comment model that i need to get all the parent comments and their children, then prefetch it to my main queryset, this is what i got so far:
I also need to use
select_related('user__profile')
on each comment object.this is my Comment model:
now the problem is when i call the one of my parent comment children ->
qs[0].parent_comments[0].children.all()
then it calls queries again.Can you help me how can i fix that?
The text was updated successfully, but these errors were encountered: