From 783d66de894c37fba46a12cd4c4b30910cf421c3 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 26 May 2022 16:12:10 -0400 Subject: [PATCH] QueryableAttribute can be used as DDL column We have a lot of mappings with like ForeignKey(A.id) so this needs to be included. Change-Id: I8ac4211fb09720f093fe7f6353f365ee1d7faaae --- lib/sqlalchemy/orm/attributes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py index b5faa7cbf1..bb7eda5ac2 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -136,6 +136,7 @@ class QueryableAttribute( interfaces.PropComparator[_T], roles.JoinTargetRole, roles.OnClauseRole, + roles.DDLConstraintColumnRole, sql_base.Immutable, cache_key.SlotsMemoizedHasCacheKey, util.MemoizedSlots, -- 2.47.2