[英]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
您需要指定Key
或Kind-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.