Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
mapreduce.input_readers.DatastoreEntityInputReader 为一种类型生成低级数据存储实体。可以将该低级数据存储实体转换为基于 ndb.model.Model 的实体吗?
罗伯特怎么说。给定一个google.appengine.datastore.Entity实例e,您可以使用 将其转换为协议缓冲区对象pb = e._ToPb(),然后您可以使用 将其转换为 ndb 实体ent = <modelclass>._from_pb(pb)。您必须知道正确的模型类(并导入它)。
google.appengine.datastore.Entity
e
pb = e._ToPb()
ent = <modelclass>._from_pb(pb)