Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit 435d771

Browse files
committed
Update README.md
Replaced predicate example since block-based predicates are not supported in CoreData
1 parent 40fcfd4 commit 435d771

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ NSArray *people = [Person where:@{
5252
}];
5353
5454
// You can even write your own NSPredicate
55-
NSPredicate *membersPredicate = [NSPredicate predicateWithBlock:^BOOL(Person *person, NSDictionary *bindings) {
56-
return person.isMember == YES;
57-
}];
58-
NSArray *members = [Person where:membersPredicate];
55+
NSPredicate *predicate = [NSPredicate
56+
predicateWithFormat:@"(name like[cd] %@) AND (birthday > %@)",
57+
name, birthday];
58+
NSArray *results = [Person where:predicate];
5959
```
6060

6161
#### Order and Limit

0 commit comments

Comments
 (0)