[Sqlalchemy-tickets] Issue #3538: docs clarification- orm.joinedload (zzzeek/sqlalchemy)
Brought to you by:
zzzeek
|
From: jvanasco <iss...@bi...> - 2015-09-23 19:10:11
|
New issue 3538: docs clarification- orm.joinedload https://bitbucket.org/zzzeek/sqlalchemy/issues/3538/docs-clarification-ormjoinedload jvanasco: I'd like to suggest extending the note in the docs on orm.joined load with something like the following: [http://docs.sqlalchemy.org/en/latest/orm/loading_relationships.html#sqlalchemy.orm.joinedload, http://docs.sqlalchemy.org/en/rel_0_8/orm/loading.html#sqlalchemy.orm.joinedload] ========== If you have already explicitly JOINed a collection onto your query for filtering (or other use), you will likely want to use `orm.contains_eager` instead of `orm.joinedload`. `joinedload` will create a second anonymously aliased join, while `contains_eager` will more efficiently re-use the existing join. ======= |