简体   繁体   English

Google AppEngine数据存储仪表板:是否创建具有“旧式”样式ID的实体?

[英]Google AppEngine Datastore Dashboard: Create Entity with “legacy”-style ID?

I understand that the Google AppEngine Data Store changed their default policy on how ID's are auto-generated. 据了解,Google AppEngine数据存储区更改了有关自动生成ID的默认政策。

We have application code that expects all ID's to be less than the maximum value for an Integer. 我们的应用程序代码期望所有ID都小于Integer的最大值。 In trying to create sample data using the dashboard ("Datastore Viewer"), there is a way to create Entities manually. 在尝试使用仪表板(“数据存储查看器”)创建示例数据时,有一种方法可以手动创建实体。 However when I do this, there appears to be no place to manually set the ID, and the auto-generated ID is larger than the maximum Integer value. 但是,当我这样做时,似乎没有位置手动设置ID,并且自动生成的ID大于最大Integer值。

Setting <auto-id-policy>legacy</auto-id-policy> in appengine-web.xml and re-deploying did not seem to help. 在appengine-web.xml中设置<auto-id-policy>legacy</auto-id-policy>并重新部署似乎没有帮助。

I understand when you create Entities programmatically, you can specify your own ID number. 我了解您以编程方式创建实体时,可以指定自己的ID号。 Is there any way to do this from the Dashboard, or at least use "legacy" auto-id generation? 有什么方法可以从控制台执行此操作,或者至少使用“旧版”自动ID生成?

No, the Datastore Viewer only allows auto-generated IDs. 不可以,数据存储查看器仅允许自动生成ID。 :( :(

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM