Commit b11f77a5 authored by Åsmund Grammeltvedt's avatar Åsmund Grammeltvedt

Outerjoin searches

Unless we do this, any record not being referenced by all child
relations will get excluded from the search.
parent 69027ac7
...@@ -741,8 +741,8 @@ class ModelView(BaseModelView): ...@@ -741,8 +741,8 @@ class ModelView(BaseModelView):
# Apply search-related joins # Apply search-related joins
if self._search_joins: if self._search_joins:
for table in self._search_joins: for table in self._search_joins:
query = query.join(table) query = query.outerjoin(table)
count_query = count_query.join(table) count_query = count_query.outerjoin(table)
joins.add(table.name) joins.add(table.name)
......
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