Commit 8edb0a78 authored by Serge S. Koval's avatar Serge S. Koval

Use joined load instead of subquery load due to performance concerns

parent 78a75fd6
import logging
from sqlalchemy.orm.attributes import InstrumentedAttribute
from sqlalchemy.orm import subqueryload
from sqlalchemy.orm import joinedload
from sqlalchemy.sql.expression import desc
from sqlalchemy import or_, Column, func
......@@ -703,7 +703,7 @@ class ModelView(BaseModelView):
# Auto join
for j in self._auto_joins:
query = query.options(subqueryload(j))
query = query.options(joinedload(j))
# Sorting
if sort_column is not None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment