문제

I'm trying to convert a django project for GAE, and I've stumbled upon this:

(relational-databse)

class Clan(models.Model):
    wars = models.ManyToManyField('self')

How can I do this in a non-relational database(i.e. gae datastore)?

도움이 되었습니까?

해결책

If you don't expect more than, say, a couple of hundred keys in the list of related entities, you could use a db.ListProperty(db.Key), containing the keys of the referenced entities.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top