When creating Entities with low-level API on AppEngine's Datastore, one must provide the kind
of the Entity, e.g.
Entity newEntity = new Entity("SomeEntityKind", id);
Docs are here, but they do not explain anything about restrictions on kind
. I also checked AppEngine Python docs, but they do not jave low-level Entities API (and Key does not list any restrictions on kind
).
Are there any restrictions on the format of the kind
? Can it contain whitespace characters? Other special characters? Any length limit?
Does anyone have more info about this?
Yeah, that's underspecified. I'll see about getting that fixed.
Basically, if you stick with names that can derived from class names, you'll be fine. Don't use leading double underscores. I'll check into specific limits later, and will update this.
Update: 500 chars max, beginning and ending with double underscores is reserved. Don't embed newlines. Unicode might get you in to trouble with parts of the SDKs that don't expect it. Basically, stick with Kind names that can be derived from class names, and you'll be fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With