我在源代码中有很多这样的字符串: let predicate = NSPredicate(format: "bodyPart.name = %@", name)
let filteredExercises= ExerciseEntity.mr_findAll(with: predicate) 但是,如您所见,如果我将BodyPart名称更改为MuscleGroup,例如,有一天它会导致如下问题: TerminatingbodyPart.name not found in entity <NSSQLEntity E
我想通过匹配字符串\xxxx\yyyy\zzzz的名称从核心数据中获取实体,所以我使用了像NSPredicate *myPredicate = [NSPredicate predicateWithFormat:" name LIKE %@", \\xxxx\\yyyy\\zzzz];一样的NSPredicate,但有时返回null。我怀疑反斜杠的问题,所以请帮助我任何one.Is从核心数据中获取此实体的方法?