CKQuery文档说:谓词中使用的键名对应于当前评估记录中的字段。键名可能包括记录的元数据属性的名称,如“creationDate”或添加到记录中的任何数据字段。
在CKQuery中还可以使用哪些元数据?如果是的话,我能使用record.recordID.recordName吗?key是什么?
发布于 2014-10-06 19:38:07
是的,您可以创建一个CKQuery来搜索这样的recordID:
var query = CKQuery(recordType: recordType, predicate: NSPredicate(format: "%K == %@", "creatorUserRecordID" ,CKReference(recordID: theSearchRecordId, action: CKReferenceAction.None)))其中theSearchRecordId是您要寻找的recordID.recordName
元数据字段是recordID、recordType、creationDate、creatorUserRecordID、modificationDate、lastModifiedUserRecordID、recordChangeTag。
发布于 2018-05-02 21:53:27
我喜欢:
NSPredicate *predicate= [NSPredicate predicateWithFormat:
@"recordID = %@",[[CKRecordID alloc] initWithRecordName:theRecordNameForThisRecord]];https://stackoverflow.com/questions/26221950
复制相似问题