I would like to do something like this:
class Author(db.Model):
influencedBy = db.ListProperty(db.SelfReferenceProperty())
influenced = db.ListProperty(db.SelfReferenceProperty())
I know I can use self.author_set to get the reverse relationship, but I need to add multiple Author objects to influenced and influencedBy.
Unfortunately you can’t do what you propose. As you probably have realized you will get
ValueError: Item type ReferenceProperty is not acceptableYou could do
influencedBy = db.ListProperty(db.Key)or if you used ndb
influencedBy = ndb.KeyProperty(kind=Author,repeated=True)Once thing to consider is how many members might be in
influencedByandinfluenced. If its possible for there to be large numbers then you might run into entity size issues. If that is a possibility you then need to consider using a separate entity to record influence.