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 hadn't even heard of select_related before you mentioned this, so I have no idea. What I do know is the expand option on encode_record will do what you're looking for for ForeignKey fields. This is one of the issues with the project: encode_data and encode_record behave somewhat differently.
I think what you'll want to do is loop over your QuerySet and use encode_record on each model instance rather than encode_data on the entire QuerySet. I think the DefaultEncoder, which should supersede the old encode_data/encode_record does this now.
I tried looping over them but it still doesn't pull in my model, which has a OneToOne relationship with the main one. Does it work with OneToOne models?
Is there a way to get encode_data to recognize models pulled in with select_related in the queryset passed to it?
The text was updated successfully, but these errors were encountered: