Closed sqlalchemy-bot closed 17 years ago
Anonymous wrote:
Example script
Michael Bayer (@zzzeek) wrote:
indeed. your example needs the synonym set up as synonym('_bar')
. fix for this issue + test committed in changeset:2342. should also fix it for "defer"/"undefer" but the unit test only looks at "eagerload".
Changes by Anonymous:
Changes by Michael Bayer (@zzzeek):
Migrated issue, originally created by Anonymous
If you have use the synonym feature of the ORM, eagerload doesn't have any affect if you use the synonym name. Take a look at the test script for an example. I create a column called "_bar" and a synonym called "bar" than refers to it. If I do eagerload("_bar") things work normally, if I do eagarload("bar") there isn't a join.
Attachments: example.py