python-redmine
python-redmine copied to clipboard
There should be a method for resultset that is equivalent to django's `prefetch_related`
Just as Django's prefetch_related
method, there should be implemented a method to accomplish the same so that all resources along with related ones can be received all at once rather than iterating over the related fields and lazy loading each of them.
Hi @alegend4u
Apologies for the late reply.
I thought about it, but Redmine's REST API is a bit special in terms of how it works with associated data. You can already kind of get a prefetch_related
using the include
kwarg for those resources that support it, this way you won't get any lazy loading.
If I'm missing something and you could provide an example where prefetch_related
would be beneficial than the current approach, I would really love to see it as that would help a lot.
Thanks.
Closing this due to inactivity.