我有一个要批量获取的键名列表 (键名存储在附加到实体的StringListProperty中)。 我的总体计划是:
usernames = userrefInstance.users # A collection of strings on another
model.
keys = [Key.from_path('User', key_name) for username in usernames]
users = db.get(keys)
我的问题是Key.from_路径点击数据存储?我试着做 尽快,如果Key.from_路径打到数据仓库我要工作了 另一种存储密钥集合的方法-我并不特别想这么做 将Key对象存储在list属性中,因为我还提供了user 跨StringListProperties的友好查询。在
传递给
Key.from_path()
的参数包含构建唯一键所需的所有信息,因此不需要它命中数据存储。在来源:https://developers.google.com/appengine/docs/python/datastore/entities
在对另一组人进行挖掘和提问后,发现:
或者您也可以使用数据库键在
相关问题 更多 >
编程相关推荐