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
Allow TortoiseMixin.orm_get_list() to take additional parameters for related objects to prefetch, search, etc (#124)
* Allow TortoiseMixin.orm_get_list() to take additional parameters for related objects to prefetch, search, etc
* Allow TortoiseMixin.orm_get_list() to take additional parameters for related objects to prefetch, search, etc
"content": "You can customize relation loading and relation search by overriding <code>orm_get_list</code> and forwarding <code>prefetch_related_fields</code> and <code>additional_search_fields</code>:",
"""This method is used to get list of orm/db model objects.
2274
2276
@@ -2277,6 +2279,8 @@ <h3>Methods and Attributes</h3>
2277
2279
:params search: a search query.
2278
2280
:params sort_by: a sort by field name.
2279
2281
:params filters: a dict of filters.
2282
+
:params prefetch_related_fields: a list of related fields to prefetch.
2283
+
:params additional_search_fields: a list of additional search fields.
2280
2284
:return: A tuple of list of objects and total count.
2281
2285
"""
2282
2286
raise NotImplementedError
@@ -2759,6 +2763,64 @@ <h3>Methods and Attributes</h3>
2759
2763
2760
2764
2761
2765
2766
+
2767
+
<pclass="text-4">
2768
+
You can customize relation loading and relation search by overriding <code>orm_get_list</code> and forwarding <code>prefetch_related_fields</code> and <code>additional_search_fields</code>:
0 commit comments