在 MagicalRecords 的文档中给出了
If you have a unique way of retrieving a single object from your data store you should do this
Person *person = [Person MR_findFirstByAttribute:@"FirstName"withValue:@"Forrest"];
我正在做这个
DX *foundDX = [DX MR_findFirstByAttribute:@"code" withValue:cell.DXCodeName];
NSLog(@"Found DX: %@, Cell Code Name is: %@",foundDX,cell.DXCodeName.text);
如果我知道值在实体中,它仍然会给我
Found DX: (null), Cell Code Name is: F45
但我在 DX 实体中已经有了这个值
那么我错过了什么?
最佳答案
很抱歉把它放在这里,但我还没有资格发表评论。您是否尝试过传递值 cell.DXCodeName.text?
关于ios - 我无法在 MagicalRecord 中找到 FirstByAttribute,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39830174/