mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-23 17:11:39 -04:00
a5a6643a95
One test in test_of_type was creating a cartesian product because contains_eager() was used with "alias" to refer to a with_polymorphic(), but the wp was not used with of_type(), so the pathing did not know that additional entities were present. while the docs indicate that of_type() should be used, there is no reason to use "alias" when you are using of_type(). Attempts to make this automatic don't work as the current usage contract with "alias" is that the contains_eager() chain can continue along in terms of the base entities, which is another example of the implicit swapping of entities for an aliased version of themselves that really should be entirely marked as deprecated throughout 1.4 and removed in 2.0. So instead, add test coverage for the of_type() versions of things and begin to make the case that we can remove "alias" entirely, where previously we thought we would only deprecate the string form. Fixes: #5096 Change-Id: Ia7b021c4044332ab3282267815f208da64410e95