I want to prefetch related data (ideally through the prefetch_related()method), 
however I need to use the 
raw() mapper method that will map a custom query (complicated table joins 
to filter my query properly) to my model. However when I try this I get:

AttributeError: 'RawQuerySet' object has no attribute 'prefetch_related'

Is there any way I can achieve the prefetching when using 
Model.objects.raw()?

Many thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/bUapwzqLvpgJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to