2012年11月19日 星期一

[SQLAlchemy] 不用primary key的table

table沒有設pirmary key會出現這個錯誤:

sqlalchemy.exc.ArgumentError: Mapper Mapper|FooTable|foo_table could not assemble any primary key columns for mapped table 'foo_table'

mapper要設:

"primary_key":(col1, col2)}

沒有留言: