Re: [sqlalchemy] inspect a scalar relationship property when it is loaded

2016-10-28 Thread mike bayer
On 10/28/2016 11:55 AM, Kent Bower wrote: The load() event would also capture if it were subqueryload()ed, right? any eagerload. And overriding Query.__iter__ wouldn't catch the cases where the scalar is a "use_get" lookup that was already in session.identity_map... right, would need

Re: [sqlalchemy] inspect a scalar relationship property when it is loaded

2016-10-28 Thread Kent Bower
The load() event would also capture if it were subqueryload()ed, right? And overriding Query.__iter__ wouldn't catch the cases where the scalar is a "use_get" lookup that was already in session.identity_map... No good way to intercept attributes.set_committed() for that, is there? On Fri, Oct

Re: [sqlalchemy] inspect a scalar relationship property when it is loaded

2016-10-28 Thread mike bayer
On 10/28/2016 10:48 AM, Kent wrote: @validates and 'set' attribute events will only fire when the /user/ sets a property (setattr), not when initially loaded by the orm. Is there a way to intercept (for inspection) a scalar relationship property instance when it is loaded? I don't think the

[sqlalchemy] inspect a scalar relationship property when it is loaded

2016-10-28 Thread Kent
@validates and 'set' attribute events will only fire when the *user* sets a property (setattr), not when initially loaded by the orm. Is there a way to intercept (for inspection) a scalar relationship property instance when it is loaded? I don't think the 'load' event will work because I