Dear fellow App Engine developers! I am trying to grasp the concept of optimistic concurrency, and how it behaves inside a transaction. I could use a bit of help, though. :)
A code fragment is here: http://pastebin.com/5RtvaHMH Simply put, I want to check if a username already exists before creating a new user, so that no duplicates of usernames can occur. The way I understand it, when inside a transaction, the datastore is "static", no changes from outside the transaction are seen. But when I try to create a new object to put in the datastore, this could happen simultaneously with two request (which both see the static datastore before the creation of a new user). Is this correct? In a situation like this, how do I guarantee uniqueness of usernames in the datastore? Thank you very much in advance! Regards, Markus -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.