[Sqlalchemy-tickets] Issue #3158: orm.with_polymorphic() does not load columns of descendant classe
Brought to you by:
zzzeek
|
From: Gabor G. <iss...@bi...> - 2014-08-07 11:44:14
|
New issue 3158: orm.with_polymorphic() does not load columns of descendant classes https://bitbucket.org/zzzeek/sqlalchemy/issue/3158/ormwith_polymorphic-does-not-load-columns Gabor Gombas: Hi, The documentation of orm.with_polymorphic() says: > Using this method will ensure that each descendant mapper’s tables are included in the FROM clause, and will allow filter() criterion to be used against those tables. The resulting instances will also have those columns already loaded so that no “post fetch” of those columns will be required. However, that does not seem to be the case in the attached example - the subquery does load b.prop, but the top level query does not, so accessing it still generates an extra query. |