开发者

the default of attribute in coredata

开发者 https://www.devze.com 2023-03-08 01:41 出处:网络
I did versioning and I added a new attribute of type string it will be empty at first I want to create a predicate to check for the empty attribute I tried

I did versioning and I added a new attribute of type string

it will be empty at first I want to create a predicate to check for the empty attribute I tried

[fetchRequest setPredicate:[NSPredicate predicateWithFormat:
                            @"( SeriesStudyID == 开发者_JAVA技巧'""' )"  ]]; 

but it doesn't work

what's the default of this attribute and how to detect the empty


SeriesStudyID is NSString

if ([SeriesStudyID length]<=0) {

    NSLog(@"empty");
}

else {
    NSLog(@"not empty");
}
0

精彩评论

暂无评论...
验证码 换一张
取 消