Stackoverflowers 同胞
我有一个问题,因为我不是数据库英雄。我有以下型号:
class Hardware(db.Model):
title = db.StringProperty()
description = db.TextProperty()
visible = db.BooleanProperty()
reservations = db.ListProperty(db.Key)
class Reservation(db.Model):
between = db.DateProperty()
until = db.DateProperty()
user = db.UserProperty()
item = db.ReferenceProperty()
active = db.BooleanProperty()
archive = db.BooleanProperty()
class UserData(db.Model):
user = db.UserProperty()
nickname = db.StringProperty()
admin = db.BooleanProperty()
locked = db.BooleanProperty()
在稍后阶段,我想看看用户做了什么预订。为此,我想在预留模型中拥有另一个 ReferenceProperty。但我不能。然后我得到一个错误
DuplicatePropertyError: Class Model already has property reservation_set
而且我不能再使用 UserProperty,因为我需要为其他用户进行预订,然后只为我的用户。
建议?