如何在Google App Engine上通过appcfg.py批量加载数据期间为数据库实体设置父级? [英] How to set parent for datastrore entity during bulkloading data by appcfg.py on Google App Engine?

查看:182
本文介绍了如何在Google App Engine上通过appcfg.py批量加载数据期间为数据库实体设置父级?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图按照这里。我得到它的工作除了设置父实体,我似乎无法找到有关如何为导入创建的实体设置父实体的信息。你可以指点我正确的方向或为我的bulkloader.Loader实现提供一个代码片段吗? 你需要覆盖Loader类的generate_key方法。有关详细信息,请参见此帖子


I'm trying to bulkload data using appcfg.py as described here. I got it working except setting parent entity, I can't seem to find info on how to set a parent entity for entity being created by the import. Can you point me to the right direction or provide a code snippet for my bulkloader.Loader implementation?

解决方案

You need to override the generate_key method of your Loader class. See this post for details.

这篇关于如何在Google App Engine上通过appcfg.py批量加载数据期间为数据库实体设置父级?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆