iOS 7.0 NSManagedObject isEqual implementation with URIRepresentation
| Originator: | jacopo | ||
| Number: | rdar://15679048 | Date Originated: | 17-Dec-2013 05:50 PM |
| Status: | Closed | Resolved: | YES |
| Product: | iOS SDK | Product Version: | iOS 7.0.x |
| Classification: | Enhancement | Reproducible: | Always |
Summary: For check if two NSManagedObject are equals the correct way today is to write [[[manObj1 objectID] URIRepresentation] isEqual:[[manObj2 objectID] URIRepresentation]] It's a bit odd that the NSManagedObject don't already override isEqual: to do that so we can write only [manObj1 isEqual:manObj2] Steps to Reproduce: 1. Get two NSManagedObject subclass that point to the same entry in the database but are created from two different CoreData stack (they must have two different memory address) 2. Call [manObj1 isEqual:manObj2] 3. Call [[[manObj1 objectID] URIRepresentation] isEqual:[[manObj2 objectID] URIRepresentation]] Expected Results: The methods at the point 2 and 3 return YES Actual Results: The method at point 2 return NO and the one at point 3 return YES Version: iOS 7.0.x
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!