- the call to self.get() in get_committed_state was missing a required parameter, rendered sqlalchemy unusable in certain situations
- fixed a large bug in dynamic_loader() where the query criterion wasn't generated correctly if other relations existed to dynamic_loader's argument
def get_committed_value(self, state):
if state.committed_state is not None:
if self.key not in state.committed_state:
- self.get()
+ self.get(state)
return state.committed_state.get(self.key)
else:
return None
except exceptions.InvalidRequestError:
raise exceptions.InvalidRequestError("Parent instance %s is not bound to a Session, and no contextual session is established; lazy load operation of attribute '%s' cannot proceed" % (mapperutil.instance_str(instance), self.attr.key))
- return sess.query(self.attr.target_mapper).with_parent(instance)
+ return sess.query(self.attr.target_mapper).with_parent(instance, self.attr.key)
def assign(self, collection):
instance = self.state.obj()