The brief code is like this:
class Word(Base):
__tablename__ = 'word'
eng = Column(String(32),primary_key=True)
chinese = Column(String(128))
word = Word(eng='art',chinese=[u'艺术',u'美术'])
session.add(word)
session.commit()
I'm trying to store word.chinese as a string. And in python it's a list... Well, when I write sql myself I could str(word.chinese) and then insert into the database. When need to get it, I could simply eval(result) to get the original python object. But since I'm using the sqlalchemy to store my objects, I wonder where to change to reach my goal...