尝试创建以下数据库时出错:
File "XXXXX/flask/lib/python2.7/site-packages/sqlalchemy/orm/relationships.py", line 1987, in _determine_joins
"expressions." % (self.prop, self.secondary)) NoForeignKeysError: Could not determine join condition between parent/child tables on relationship PostReply.tags - there are no foreign keys linking these tables via secondary table 'postReplyTags'. Ensure that referencing columns are associated with a ForeignKey or ForeignKeyConstraint, or specify 'primaryjoin' and 'secondaryjoin' expressions.
关于这个数据库和相关部分的更多信息。它有posts和post-replies,这两个都可以添加标签。在
其设置如下:
^{pr2}$奇怪的是,所有的帖子都能正常工作,而帖子回复却不行。有谁能帮我弄清楚为什么会这样吗?这是标签和帖子/帖子回复的多对多关系?非常感谢!在
原来camel case中的内容不起作用,需要用下划线转换。例如,postReply到post_reply
相关问题 更多 >
编程相关推荐