def get_one_for_update(self, object_id):
        """
        Retrieve an object by its object_id
        Does a select for update on the row, results in row level lock for the duration of the transaction

        :param object_id: the objects id.
        :return: the requested object
        :raises: :class: NoResultFound when the object could not be found
        """
        return self.session.query(self.cls).with_for_update().filter_by(id=object_id).one()
def get_one_for_update ( self , object_id ) : return self . session . query ( self . cls ) . with_for_update ( ) . filter_by ( id = object_id ) . one ( )
Retrieve an object by its object_id
        Does a select for update on the row, results in row level lock for the duration of the transaction

        :param object_id: the objects id.
        :return: the requested object
        :raises: :class: NoResultFound when the object could not be found