diff --git a/sqladmin/models.py b/sqladmin/models.py index c9ac6974..f78abf48 100644 --- a/sqladmin/models.py +++ b/sqladmin/models.py @@ -811,6 +811,7 @@ async def get_object_for_edit(self, request: Request) -> Any: stmt = self.form_query(request) if type(self).form_query == ModelView.form_query: + # If form_query fn hasn't been overridden, add all relationships for relation in self._form_relations: stmt = stmt.options(joinedload(relation))