【总结】
当一个表中出现多个:ForeignKey 则SQLAlchemy无法识别,具体哪个属性,从哪个去找,所以报错:
AmbiguousForeignKeysError: Could not determine join condition between parent/child tables on relationship Task.initiator
解决办法:
给db.relationship添加foreign_keys,就可以指明具体是哪个属性了。
【总结】
当一个表中出现多个:ForeignKey 则SQLAlchemy无法识别,具体哪个属性,从哪个去找,所以报错:
AmbiguousForeignKeysError: Could not determine join condition between parent/child tables on relationship Task.initiator
解决办法:
给db.relationship添加foreign_keys,就可以指明具体是哪个属性了。