在object中设置了某个Key为唯一索引,但是后台看了数据,一共三个记录,改Key里面都没有要存储的值。
但是前端一执行saveInBackgroundWithBlock写入Key的一个新值,就会报告
NSLocalizedDescription = "A unique field was given a value that is already taken.";
code = 137;
error = "A unique field was given a value that is already taken.";

请问是怎么回事呢?

错误更新下,发现是这个原因造成的,但是不理解为什么?

设置了一个唯一索引key,但是第一次saveInBackgroundWithBlock,没有设置这个对象,就会报错
是不是这个唯一索引必须要有值??不能为空

你好,创建索引时,「允许缺失值」勾上了吗?