What I'm trying to do is request a datastore for a model where the key is not the key for the object that I already have. Here is the code:
class User(db.Model): partner = db.SelfReferenceProperty() def text_message(self, msg): user = User.get_or_insert(msg.sender) if not user.partner:
The idea is to find another User who does not have a partner who is not a user that we already know.
I tried filter('key !=, user.key()) , filter('__key__ !=, user.key()) and a couple more others, and nothing returns another User who has no partner. filter('foo !=, user.key()) also returns nothing for the record.
source share