ensembles icon indicating copy to clipboard operation
ensembles copied to clipboard

The same global ids for different entities does not work in version 1.x

Open drewmccormack opened this issue 11 years ago • 0 comments

Using the same global id in two different entities, even when they are not parent-children, does not work in v1.x. It gives an error on merging for this code:

- (void)setValue:(id)value forKey:(NSString *)key inObject:(id)object
{
    id currentValue = [self valueForKey:key inObject:object];
   if (value != currentValue && ![value isEqual:currentValue]) {
        [object willChangeValueForKey:key];
--->    [object setPrimitiveValue:value forKey:key];
        [object didChangeValueForKey:key];
    }
}

Error is Unacceptable type of value for to-one relationship: property = "..."; desired type = AnEntity; given type = AnotherEntity; value = ...

Suspicious code is

  • (NSSet *)globalIdentifierStringsInObjectChanges:(id)objectChanges

drewmccormack avatar Sep 18 '14 12:09 drewmccormack