summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/schema.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql/schema.py')
-rw-r--r--lib/sqlalchemy/sql/schema.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py
index 689eda11d..65f8bd81c 100644
--- a/lib/sqlalchemy/sql/schema.py
+++ b/lib/sqlalchemy/sql/schema.py
@@ -477,7 +477,10 @@ class Table(DialectKWArgs, SchemaItem, TableClause):
]
def _gen_cache_key(self, anon_map, bindparams):
- return (self,) + self._annotations_cache_key
+ if self._annotations:
+ return (self,) + self._annotations_cache_key
+ else:
+ return (self,)
def __new__(cls, *args, **kw):
if not args: