Skip to content

Commit 1bf1864

Browse files
authored
Merge pull request fastapi#24 from leynier/fork-14
Fork 14
2 parents 1f76699 + 2174bdb commit 1bf1864

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sqlmodel/sql/expression.py.jinja2

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ _TSelect = TypeVar("_TSelect")
2727
if sys.version_info.minor >= 7:
2828

2929
class Select(_Select, Generic[_TSelect]):
30-
pass
30+
inherit_cache = True
3131

3232
# This is not comparable to sqlalchemy.sql.selectable.ScalarSelect, that has a different
3333
# purpose. This is the same as a normal SQLAlchemy Select class where there's only one
3434
# entity, so the result will be converted to a scalar by default. This way writing
3535
# for loops on the results will feel natural.
3636
class SelectOfScalar(_Select, Generic[_TSelect]):
37-
pass
37+
inherit_cache = True
3838

3939
else:
4040
from typing import GenericMeta # type: ignore
@@ -43,10 +43,10 @@ else:
4343
pass
4444

4545
class _Py36Select(_Select, Generic[_TSelect], metaclass=GenericSelectMeta):
46-
pass
46+
inherit_cache = True
4747

4848
class _Py36SelectOfScalar(_Select, Generic[_TSelect], metaclass=GenericSelectMeta):
49-
pass
49+
inherit_cache = True
5050

5151
# Cast them for editors to work correctly, from several tricks tried, this works
5252
# for both VS Code and PyCharm

0 commit comments

Comments
 (0)