In core data you can set a relationship to optional but you can set it with minimum checked or without… Check the images below for the difference.
What I think I’ve noticed is that when you search for an object using a predicate like:@"object != %@", objectToSearchFor, the first setting returns nil’s but the second setting doesn’t. I can be mistaken about that but does anybody know the difference between the two settings?


P.s. I don’t know if it matters but I’m using SQLite as DB engine.
There is some documentation about this in the NSRelationshipDescription Class Reference:
So for example, in the case of an optional to-many relationship: The value of the relationship must be either
nil, or contain at least the minimum count of required objects.In the case of an optional to-one relationship, the relationship value either is
nilor points to another object, so I cannot think of a situation where it makes a difference whether the minimum count is 0 or 1.All the constrains like minimum and maximum count etc. are checked when saving a managed object context.