am designing a feed system for users.
so i have:
class User(db.Model):
name = db.StringProperty()
list_of_keys = db.StringListProperty()
class Feed(db.Model):
event = db.StringProperty()
timestamp = db.DateTimeProperty()
# I created 10 feed entities
# assuming i already have my 10 feed entities, I take their keys and put into this list
list_of_keys = ["key1","key2","key3",.........."key10"]
if I use
db.key(list_of_keys)
I get all the entities. no problem. So it works when all of the keys are present ( ie: it works if the entities are still in the datastore)
But if I delete even one of the entities, then db.key() returns a NoneType.
any suggestions on how to go about this?
PS: i'm trying to avoid using ReferenceProperty in my feed system, cos I think it might get messy
if you still suggest that I use ReferenceProperty, here are my goal(s):
1. Each feed entity should "belong" to more than one user.
2. Each user can have up to 20 feeds max.
3. New feeds will replace the old ones based on timestamp.
would love to hear your thoughts/solutions.