- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
.DeleteSelf 究竟如何运作?文档说:
When the reference object’s action is set to CKReferenceActionDeleteSelf, the target of the reference—that is, the record stored in the reference’s recordID property—becomes the owner of the source record. Deleting the target (owner) record deletes all its source records.
但我的印象是删除目标并不总是会删除源。当它保留在容器中时非常烦人,客户端下载它,并期望引用指向某个地方,但是在客户端上构建服务器数据存储的切片时目标不存在?
你如何看待这个案例?你无视那种记录?或者您定期查找 CloudKit 存储,搜索损坏的记录以将其删除?
或者与其删除一条记录,不如将其设置为已删除状态的属性,但将其保留在数据库中更好吗?
最佳答案
我刚刚在这个问题上苦苦挣扎了一段时间,我想我会分享我的发现......
这基本上是一个权限问题。仅当删除记录的用户对所有需要删除的记录具有“写入”权限时,级联删除才会起作用。因此,在 CloudKit Dashboard 中,级联删除仅适用于使用开发者的 iCloud 帐户创建的记录。
如果您需要删除不属于删除它们的用户的记录,您可以在安全性下为记录类型添加“写入”权限。
关于ios - CKReference .DeleteSelf 属性无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32788980/
.DeleteSelf 究竟如何运作?文档说: When the reference object’s action is set to CKReferenceActionDeleteSelf, th
我是一名优秀的程序员,十分优秀!