I store a record that has a natural Long primary key (a facebook user
id).  I currently create a Key with that id and insert this record.

I just noticed this comment on the Entity(Key) constructor:  "Creating
an entity for the purpose of insertion (as opposed to update) with a
key that has its id field set is strongly discouraged unless the key
was returned by a KeyRange."

Is this "strongly discouraged" because the author of that comment is
afraid I will accidentally insert an entity with a null key and the
resulting generated key might conflict with existing data?  Or is this
strongly discouraged because there is an actual performance problem
doing this on the server?

I expect a staggering large write volume, all of which will overwrite
the old records without any need to load them first.  I need to do
this the most efficient way possible.  Is my current solution the best
performing, or is it better to stringify the user id and use that as a
keyname?

Thanks in advance,
Jeff

--

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.


Reply via email to