Re: [sqlalchemy] Disabling implicit lazy loading

2015-07-24 Thread Yegor Roganov
Thanks, you are as always very helpful. I hope I'll be able to compose a PR soon. On Thursday, July 23, 2015 at 5:39:52 PM UTC+3, Michael Bayer wrote: On 7/23/15 10:09 AM, Mike Bayer wrote: On 7/23/15 1:24 AM, Yegor Roganov wrote: Hi all! Is there a way to disable implicit

Re: [sqlalchemy] Disabling implicit lazy loading

2015-07-23 Thread Mike Bayer
On 7/23/15 10:09 AM, Mike Bayer wrote: On 7/23/15 1:24 AM, Yegor Roganov wrote: Hi all! Is there a way to disable implicit loading of relationships? For example, I want an exception to be thrown if I try to access 'address.user' unless user was explicitly loaded via options address =

Re: [sqlalchemy] Disabling implicit lazy loading

2015-07-23 Thread Mike Bayer
On 7/23/15 1:24 AM, Yegor Roganov wrote: Hi all! Is there a way to disable implicit loading of relationships? For example, I want an exception to be thrown if I try to access 'address.user' unless user was explicitly loaded via options address =

[sqlalchemy] Disabling implicit lazy loading

2015-07-22 Thread Yegor Roganov
Hi all! Is there a way to disable implicit loading of relationships? For example, I want an exception to be thrown if I try to access 'address.user' unless user was explicitly loaded via options address = query(Address).options(joinedload(Address.user)).filter_by(id=id).first(); address.user