I refer to the section "Java | Storing Data | Creating, Getting and
Deleting Data | Keys" in the GAE documentation. What it says is that
for any key type that your persistent entity class uses, keys (or key
elements) of type String can be set by the app, but that for type Long
the datastore sets this and the app cannot:

"The app can provide the ID portion of the key as a string when the
object is created, or it can allow the datastore to generate a numeric
ID automatically."

This should explain your exceptions:

"javax.jdo.JDOFatalUserException: Attempt was made to manually set the
id component of a Key primary key.  If you want to control the value
of the primary key, set the name component instead."

You are now using a String, which is allowed for your key.
--~--~---------~--~----~------------~-------~--~----~
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