Hi all,

In my app I am using gae-utilities sessions. One of my sessions
variables is an entity that I retrieve from the datastore which holds
reference properties to various other entities describing the user
(e.g., his address data, her profile data, etc).

example:

class UserStatic(db.Model):
    firstName = db.StringProperty()
    mi        = db.StringProperty()
    lastName  = db.StringProperty()

class User(db.Model):
    password  = db.StringProperty()
    static    = db.ReferenceProperty(UserStatic)

so I have something like:

self.sess = Session()
self.sess['user'] = User.get_by_key_name('[email protected]')

Now let's say I modify something in the user's static data:

static = self.sess['user'].static
static.firstName = 'frank'
static.put()

The problem is that self.sess['user'].static (or I guess self.sess
['user']) won't have the updated value unless I re-query the
datastore. Something like:

self.sess['user'] = User.get_by_key_name('[email protected]')

Am I doing it wrong or is this how it's supposed to work?

Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to