Hi, I have an issue with too many entities being created in my GAE datastore.
I have an unique id on an entity (which is not the key in this case), and there should thus only be one entity in the datastore per unique id. When an entity is updated or created by the user, I check whether the entity already exists in the DB, and only create a new entity, if there is not already an existing entity with a matching id. If there is an existing entity, I update the parameters of the entity. This logic should ensure that there is only one entry/entity per unique id, but somehow several entities with the same id are created in the DB - I do not understand how/why! When I look at this page https://cloud.google.com/appengine/docs/java/datastore/entities#Java_Updating_an_entity is says "You can use a transaction <https://cloud.google.com/appengine/docs/java/datastore/transactions> to test whether an entity with a given key exists before creating one.". Do I really need to use transactions to validate whether there is an existing entity with a given id, or does that only apply when you use the key as primary key?? Thanks, -Louise -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/95613110-d423-417a-97c9-508b9b3528b8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
