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   # OK
> address = query(Address).get(id); address.user # should throw


At first I thought that `noload` option is what I need, but it seems it 
disables event explicit loading.
If you are intrested why I need this kind of functionality, that's because 
I found it hard to manage which relationships were loaded and which not, 
and it may result in dozens of unwanted DB queries.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to