In the Javadoc for Entity.getKey(), it says:

If the entity has not yet been saved (e.g. via DatastoreService.put), this 
Key will not be fully specified and cannot be used for certain operations 
(like DatastoreService.get). Once the Entity has been saved, its Key will be 
updated to be fully specified.

Does this only refer to the fact that the entity might not yet have an ID or 
keyname?  In other words, if I construct the entity with an ID or keyname, 
can I rely on entity.getKey() to return something I can use in a 
db.get(key), or is there some other part that is not fully specified until a 
put?  Considering that you can get a full key from a KeyFactory with only a 
kind and keyname/ID, I'm assuming this would work, but I'd like to make 
sure.

Thanks. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/blZubkEyMy0tOXNK.
To post to this group, send email to google-appengine-java@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.

Reply via email to