1) Readable-urls.  http://yourapp.appspot.com/users/max versus
http://yourapp.appspot.com/users/192398411324987

2) The datastore doesn't support uniqueness constraints so a user-defined
key is the only way you can do a true createIfNonExistent() method:

beginTxn();
Entity e;
try {
  e = lookupByKeyName(keyName);
} cath (EntityNotFoundException enfe) {
  e = createNewEntity(keyName);
}
commitTxn();

The final line throws ConcurrentModificationException if someone else
created an entity with the same keyName in between the lookup and the
commit.

Max
On Sun, Feb 21, 2010 at 5:08 PM, DutrowLLC <[email protected]> wrote:

> Hi,
>
> What is the intended purpose of keyName when creating a new Key or new
> Entity in the low-level API?  What are the proper use cases for
> keyName?
>
> Thanks!
>
> Chris
>
> --
> 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
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
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 [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-java?hl=en.

Reply via email to