Hi all, I'm writing some tests #18586) for defer() and only() and there appears to be a bug when it comes to chaining these two in a single query.
If you look at the docs (https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.only), it says this: # Final result is that everything except "headline" is deferred.Entry.objects.only("headline", "body").defer("body") # Final result loads headline and body immediately (only() replaces any# existing set of fields). Entry.objects.defer("body").only("headline", "body") However, when I test the last example "body" is still deferred after only() has been applied to it. In a situation where there are only these two fields in a model there should be no deferred field. Is there any reason for this or does this need reporting as a bug. If so, what's the procedure for this? Many thanks, Will -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5a46bca6-3c88-4ac1-aa5b-5190d25895ec%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.