Why Email, Username, PostalCode, etc as entities i

2019-02-23 20:55发布

I have seen the in GAE datastore there are so many entity which at the end are Strings, at least apparently.

List of GAE Java Datastore Entities

I'd like to know the underneath reason for that? indexing? semantic search?

2条回答
我想做一个坏孩纸
2楼-- · 2019-02-23 21:21

It's quite clear to me -- the question is what were we (Google App Engine designers) thinking when we added those "semantic" property types.

I wasn't on the team then, but I think we were enamored with automatically generating XML from entities using the ATOM schema. I don't think this is very popular or useful in practice. You're free to ignore these -- their validation is all trivial (must not be empty).

In NDB (a new Python client for the datastore) I decided not to support these semantic property types or XML generation and so far only one person requested it: http://code.google.com/p/appengine-ndb-experiment/issues/detail?id=96

查看更多
Bombasti
3楼-- · 2019-02-23 21:24

I had the same question a couple years ago. Nick answered it here. The Java classes provide parity with Python, and in Python it's useful for the special .to_xml() behaviour. It's possible that when GAE gets proper GEO queries the GeoPt might become useful but otherwise you can ignore them.

查看更多
登录 后发表回答