On Tuesday, March 27, 2012 6:41:25 AM UTC-7, aschmid wrote: > > is there an equivalent of the db.Model function is_saved() with ndb.Model?
No; what are you trying to do? You might be able to check whether the entity has a key and if so, whether that key isn't incomplete: if ent.key and ent.key.id(): # It has a complete key. else: # Hasn't been written, ever. However this can be fooled if you explicitly set the key or the id when you create an entity, e.g. ent = Employee(id='joe') or ent = Employee(key=ndb.Key(Employee, 'joe')) (These two are equivalent.) --Guido van Rossum -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/MeORtJLdaqEJ. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.