Closed king-11 closed 3 years ago
using select_related and prefetch_related make sql joins rather than hitting database again to fetch those values
@krashish8 ptal!
I mean 'select_related' can only be used for ForeignKey and OneToOneField. So, maybe we can't use 'joint_secy' here, and similarly for 'joint_gensec' below.
we can use prefetch related then
Yup
using select_related and prefetch_related make sql joins rather than hitting database again to fetch those values