What is the difference between key_id and key_name in the App Engine datastore?

AFAIK, there is only one difference: key_id must be int, and key_name must be a string. Are there any other practice restrictions using key_id vs key_name?

+5
source share
2 answers

You are correct that the only difference is the type (1! = '1'). Please note that this affects the ordering of the results, if you sort by key (as you would expect) - integers are sorted before the lines.

+5
source

The key is a unique object in all applications, such as "ag5kZXZ-ZmVlbG1hcmtldHIRCxILU3RvY2tQcmljZXMYZgw"

Entity "john" "mart"

-1

All Articles