def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def get_bind(self, mapper=None, *args, **kwargs):
                    return super(MySession, self).get_bind(
                        mapper, *args, **kwargs
                    )