Why Email, Username, PostalCode, etc as entities in GAE Datastore

陌路散爱 提交于 2019-12-01 19:08:35
Richard Watson

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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!