简体   繁体   English

为什么Google Appengine API数据存储区实体没有空的构造函数?

[英]Why does the google appengine api datastore Entity not have an empty constructor?

When I pass an entity from ios to a backendAPI method that expects an entity I get the error "... No suitable constructor found for type [simple type, class com.google.appengine.api.datastore.Entity] ..." Why does the google appengine api datastore Entity not have an empty constructor? 当我将实体从ios传递到需要实体的backendAPI方法时,出现错误“ ...没有找到类型[简单类型,类com.google.appengine.api.datastore.Entity]的合适的构造函数...”为什么Google Appengine API数据存储区实体没有空的构造函数? Also, is there a way for me to provide a suitable constructor other than using objectify? 另外,除了使用objectify之外,是否有其他方法可以提供合适的构造函数? I tried using objectify and was able to get rid of the error but then the values of all my properties were deleted and set to null. 我尝试使用objectify并能够摆脱该错误,但是随后删除了我所有属性的值并将其设置为null。

(I'm assuming you're using Java language) (我假设您正在使用Java语言)

There is no empty-constructor because to create an Entity you need to specify a Key or a Kind-Id/Name 没有空构造函数,因为要创建Entity您需要指定KeyKind-Id/Name

Source: https://cloud.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Entity 来源: https//cloud.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Entity

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

相关问题 实体Google数据存储区是否可以具有“空”属性? - Does the entity google datastore could have “empty” property? 为什么会失败? (Google Appengine数据存储区,Python) - Why does this fail? (google appengine datastore, python) 将属性设置为com.google.appengine.api.datastore.Entity - Setting a property to com.google.appengine.api.datastore.Entity 使用Go更新Google Appengine数据存储区中的实体 - Updating entity in Google Appengine datastore with Go 如何将com.google.appengine.api.datastore.Entity转换为我的实体对象? - How to convert com.google.appengine.api.datastore.Entity to my Entity Object? Google Appengine Search API到数据存储区查询 - Google Appengine Search API to Datastore Query AppEngine ClassNotFoundException:com.google.appengine.api.datastore.DatastoreServiceFactory - AppEngine ClassNotFoundException: com.google.appengine.api.datastore.DatastoreServiceFactory Google AppEngine数据存储仪表板:是否创建具有“旧式”样式ID的实体? - Google AppEngine Datastore Dashboard: Create Entity with “legacy”-style ID? Java Google Appengine datastore.get在现有实体上引发EntityNotFoundException - Java Google appengine datastore.get throws EntityNotFoundException on an existing entity 谷歌appengine数据存储客户端 - google appengine datastore client
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM