首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >查询系统字段时的CKError :拒绝“未知字段'createdAt'”

查询系统字段时的CKError :拒绝“未知字段'createdAt'”
EN

Stack Overflow用户
提问于 2018-04-19 21:44:43
回答 1查看 638关注 0票数 4

我对createdAt系统字段进行了如下排序:

代码语言:javascript
复制
query.sortDescriptors = [NSSortDescriptor(key: "createdAt", ascending: false)]

并得到以下错误:

CKError 0x1c4447fb0:“无效参数”(12/2018);服务器消息=“未知字段'createdAt'";uuid =9C450848-2449-2492-93BC-C46363203042;容器ID =”.

我能够以这种方式查询和排序我创建的字段。系统字段有什么不同吗?该字段的索引是可排序的和可查询的。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-04-22 10:56:00

相反,使用creationDate作为密钥。CK仪表板中的元键与用于查询的略有不同。以下是一个元密钥列表:

代码语言:javascript
复制
recordID: CKRecordID
The unique ID of the record.

recordType: String
The app-defined string that identifies the type of the record.

creationDate: Date?
The time when the record was first saved to the server.

creatorUserRecordID: CKRecordID?
The ID of the user who created the record.

modificationDate: Date?
The time when the record was last saved to the server.

lastModifiedUserRecordID: CKRecordID?
The ID of the user who last modified the record.

recordChangeTag: String?
A string containing the server change token for the record.
票数 12
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49930687

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档