.. change::
:tags: bug, orm, engine
- :tickets: 5056, 5050
+ :tickets: 5056, 5050, 5071
Added test support and repaired a wide variety of unnecessary reference
cycles created for short-lived objects, mostly in the area of ORM queries.
for rec in context.create_eager_joins:
strategy = rec[0]
- strategy(*rec[1:])
+ strategy(context, *rec[1:])
if context.from_clause:
# "load from explicit FROMs" mode,
context.create_eager_joins.append(
(
self._create_eager_join,
- context,
entity,
path,
adapter,
go()
+ def test_query_joinedload(self):
+ User, Address = self.classes("User", "Address")
+
+ s = Session()
+
+ def generate():
+ s.query(User).options(joinedload(User.addresses)).all()
+
+ # cycles here are due to ClauseElement._cloned_set and Load.context
+ @assert_cycles(28)
+ def go():
+ generate()
+
+ go()
+
def test_plain_join(self):
users, addresses = self.tables("users", "addresses")