tie in sqlalchemy orm