Nested queryset

21 views
Skip to first unread message

Shubham Khandare

unread,
Aug 8, 2019, 7:32:45 AM8/8/19
to Django REST framework

Jurgis Pralgauskis

unread,
Aug 8, 2019, 11:49:25 AM8/8/19
to django-res...@googlegroups.com
If models are not related by fk, you need to manually prefetch each layer, 

and each next layer with prevIdField__in = [ids pf prev layer]


2019-08-08, kt 14:32, Shubham Khandare <shubham....@gslab.com> rašė:

Confidentiality Notice and Disclaimer: This email (including any attachments) contains information that may be confidential, privileged and/or copyrighted. If you are not the intended recipient, please notify the sender immediately and destroy this email. Any unauthorized use of the contents of this email in any manner whatsoever, is strictly prohibited. If improper activity is suspected, all available information may be used by the sender for possible disciplinary action, prosecution, civil claim or any remedy or lawful purpose. Email transmission cannot be guaranteed to be secure or error-free, as information could be intercepted, lost, arrive late, or contain viruses. The sender is not liable whatsoever for damage resulting from the opening of this message and/or the use of the information contained in this message and/or attachments. Expressions in this email cannot be treated as opined by the sender company management – they are solely expressed by the sender unless authorized.

--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-fram...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-rest-framework/71e68bc7-e4fc-4319-b5ab-f82c97f74e09%40googlegroups.com.

Jurgis Pralgauskis

unread,
Aug 8, 2019, 11:52:17 AM8/8/19
to django-res...@googlegroups.com
Ang then dispatch/group where what  belongs in python layer - I think prefetch-related works this way (just using explicit FK)

Shubham Khandare

unread,
Aug 9, 2019, 2:58:24 AM8/9/19
to Django REST framework
I am stuck  at manually fetching those id's ! How should I write ORM query for it?


On Thursday, August 8, 2019 at 5:02:45 PM UTC+5:30, Shubham Khandare wrote:
Reply all
Reply to author
Forward
0 new messages