我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用sqlalchemy.orm.configure_mappers()。
def set_sqlite_pragma(dbapi_connection, connection_record): cursor = dbapi_connection.cursor() cursor.execute("PRAGMA foreign_keys=ON") cursor.close() # run configure_mappers after defining all of the models to ensure # all relationships can be setup