Perform a join in 5 tables or more than that USIN ORM

38 views
Skip to first unread message

narendra...@gmail.com

unread,
Jan 30, 2022, 7:26:07 AM1/30/22
to Django users
hello folks,
 any django ex[ert here, I want to know if anybody can do multiple join more than 5 tables at once using ORM Prefetch,prefetch_related,select_related using any of these or in a different way please ping, or just write over here how can we solve that. i didn't get any clue
help will be appreciated

Sam Chaffy

unread,
Jan 30, 2022, 9:53:14 AM1/30/22
to django...@googlegroups.com
Yes you can 

What’s your model look like ?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a2097a78-1446-4456-83a1-c96059a12a1dn%40googlegroups.com.
--
Oussama Chafiqui

narendra thapa

unread,
Jan 30, 2022, 9:03:33 PM1/30/22
to django...@googlegroups.com
here are my models serializers and views and i need a data in tree structure. the function in view file is get_course_tree_view
and rest are the models and serializers I need to join all these tables together to fetch data i was able to do only three joins

models.py
serializers.py
serializers.py
models.py
views.py
Reply all
Reply to author
Forward
0 new messages