In Swift, I got
Could not find overload for '! = ', which accepts the provided arguments
error. My relationship was correctly marked as optional, but in the generated NSManagedObject my @NSManaged property was not ? after him. So this check with nil failed. Did I add ? and then I was able to check for a relationship.
Before (not working)
@NSManaged var myRelationShip: MyClass
After (works)
@NSManaged var myRelationShip: MyClass?
High6 source share