[sqlalchemy] anyone have strategies for limiting queries of related objects to specific column(s) ?

2013-11-18 Thread Jonathan Vanasco
this is just wild thinking -- and might not be possible. I'm wondering if anyone has some ideas on creating a relationship where only certain columns are queried during relationship loading. I have a few relationships like this ( pseudocode ) class Tag2Posting: tag_id INT

Re: [sqlalchemy] anyone have strategies for limiting queries of related objects to specific column(s) ?

2013-11-18 Thread Michael Bayer
you can either make a non-primary mapper() for the class with “include_attributes” and set that as the target of the relationship, or you can use the new load_only() loader option at query time. On Nov 18, 2013, at 3:27 PM, Jonathan Vanasco jonat...@findmeon.com wrote: this is just wild