我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用app.db.relationship()。
def __repr__(self): return '<Dataset %r>' % self.expt_id # For a many to many database relationship, use a mapping table (no class definition directly) # Eg. each publication may have many datasets, and each dataset may belong to many publications # Each row in this table is one "dataset in publication" membership