Useful to perform some prefetching of your relations in order to avoid
the n+1 queries problem.
class TypeResource(ModelResource):
class Meta:
model = Type
include_type = True
query_options = [joinedload(Type.machines)]
class Schema:
machines = fields.ToMany('machine')
Coverage decreased (-0.02%) to 89.095% when pulling 961d2f6422519d6effd5121ec676a3ec222a0dfb on ticosax:query-options into 1ae0208d941a3a76855ac67369ed5031dcc6f636 on biosustain:master.
Coverage increased (+0.02%) to 89.131% when pulling 961d2f6422519d6effd5121ec676a3ec222a0dfb on ticosax:query-options into 1ae0208d941a3a76855ac67369ed5031dcc6f636 on biosustain:master.
Useful to perform some prefetching of your relations in order to avoid the n+1 queries problem.