In an App Engine app, I store registered members in a table that looks like this:
class Member(db.Model):
user = db.UserProperty(required=True)
#other stuff
The problem starts when I need to check if a User is already in my Member table. GAE documentation says user value is not guaranteed not to change in time since it is composed by the user object+email. So it will change if the user changes the e-mail on that account.
I am using OpenID. So I though about using User.federated_identity() as a stable identifier.
However to check for this I'd have to do a Query like this:
u = users.get_current_user()
rm = Member.all().filter('user_federated_identity =',u.federated_identity()).get()
This is a valid query in Django, but apparenty not in GAE. What can I do here, other that loading all my members to memory and checking their federated_identity?