我无法在 MagicalRecord 中找到 FirstByAttribute
I'm unable to findFirstByAttribute in MagicalRecord
在 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?
在 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?