I see the following pattern in the documentation to ensure strong consistency:

user_key = db.Key.from_path('User', 'ryan') # Put two entities 
db.put([TestModel(parent=user_key), TestModel(parent=user_key)]) # Global query 
doesn't see the data. self.assertEqual(0, TestModel.all().count(3)) # Ancestor 
query does see the data. self.assertEqual(2, 
TestModel.all().ancestor(user_key).count(3)) 

I'm wondering if this is good practice. The parent of the TestModel is set to 
some contrived key that has no model associated with it. I'm currently in the 
process of migrating to HRD and can use this pattern to work-around some 
consistency probelsm.  

- Klaas Pieter

-- 
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