Re: [sqlalchemy] possible way of changing the relationship loading strategy in the runtime, on the class level or instance level

2015-05-11 Thread Mike Bayer
On 5/11/15 5:50 AM, Geo wrote: I have a base class node: class Node: parent= relation( 'Node', remote_side=[id], backref=backref( 'children', collection_class=ordering_list('position'), order_by=[position],

Re: [sqlalchemy] possible way of changing the relationship loading strategy in the runtime, on the class level or instance level

2015-05-11 Thread Geo
I tested on class level and the inspect function, sth like this: inspect(FilmNode).add_property(children_lazy, relation( Film, remote_side=[FilmNode.id], lazy='dynamic', uselist=True ) ) and class FilmNode(Node): children_lazy = relation(