10
votes

The appengine docu says on repeated ndb properiertes, that:

When updating a repeated property, you can either assign it a new list or mutate the existing list in place.

https://developers.google.com/appengine/docs/python/ndb/properties#repeated

Two questions:

  1. do I save write operations when I just mutate the list, instead of putting a new list in place?

  2. how do I do exactly the mutation? just append the object and delete items within the list as I would do it with a list in python?

Thanks!

1

1 Answers

6
votes

Yes you have it correct in your mind.

  1. No you don't save because it's still a write operations with the applied costs.
  2. Yes exactly like that. Appending like a normal list, deleting, etc etc.