我使用的药剂作为我的ORM的MySQL数据库,我在写一个更新语句,比如问题:写update语句
"update products set price=NULL where id>100"
这是我的灵药clsee
class Product(Entity):
using_options(tablename='model_product')
name = Field(Unicode(200))
en_name = Field(Unicode(200))
price = Field(Float)
en_price = Field(Float)
productid = Field(Unicode(200))
site = Field(Unicode(30))
link = Field(Unicode(300))
smallImage = Field(Unicode(300))
bigImage = Field(Unicode(300))
description = Field(UnicodeText)
en_description = Field(UnicodeText)
createdOn = Field(DateTime, default=datetime.datetime.now)
modifiedOn = Field(DateTime, default=datetime.datetime.now)
size = Field(Unicode(30))
en_size = Field(Unicode(30))
weight = Field(Unicode(30))
en_weight = Field(Unicode(30))
wrap = Field(Unicode(30))
en_wrap = Field(Unicode(30))
material = Field(Unicode(30))
en_material = Field(Unicode(30))
packagingCount = Field(Unicode(30))
stock = Field(Integer)
location = Field(Unicode(30))
en_location = Field(Unicode(30))
popularity = Field(Integer)
inStock = Field(Boolean)
categories = Field(Unicode(30))
我应该怎么做?
如何模型类(ES)定义的? – snapshoe 2010-10-19 03:18:15
@ ma3204该类定义如上所列 – mlzboy 2010-10-19 03:20:46