mysql 的某个 table 使用了 sqlalchemy 的 metadata 作为字段现在出问题了,有没有什么好的解决办法,在不改动数据库的情况下?
sqlalchemy 源码中的注释
we expect to see the name 'metadata' in some valid cases; however at this point we see it's assigned to something trying to be mapped, so raise for that.
1
DeanThompson 2016-03-30 18:30:23 +08:00 1
SQLAlchemy 的字段名和数据库的字段名可以不一样,`Column` 支持指定数据库里的字段名,如:
mtdata = Column("metadata", String(50)) 在 Python 里使用的时候,引用的是 `mtdata`, SQLAlchemy 会映射到数据库里的 metadata 字段。 |
2
greenmoon55 2016-03-30 20:22:39 +08:00
我也用了类似 LS 的方法
|
3
sinux 2016-03-30 21:31:28 +08:00
头像太美。
|
8
cavalier1106 2016-03-30 22:52:23 +08:00
@sinux 魔兽世界 什么装备来的
|
9
sinux 2016-03-31 10:30:05 +08:00
@cavalier1106 忘记了,在 DOTA 里是圣者遗物
|