Hello again. I have the following test query:
def test_slot_access_after_query(self): q = self.session.query(Foo, Bar).with_labels() q = q.filter(Foo.bar_id == Bar.id) rows = q.all() assert len(rows) > 0 with self.assert_no_sql_while(): for (each_foo, _each_bar) in rows: each.bar.data # <-- FAILS HERE SQLAlchemy emits SQL to fetch each.bar's data. I do not understand why. I expected that: * Bar is already cached in the session. * each.bar first checks if a bar with the appropriate id is present in the session and if so, return it. What am I doing wrong? Thank you, Ladislav Lenart -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.