Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
drewmccormack opened this issue Sep 18, 2014 · 0 comments

Comments

@drewmccormack
Copy link
Owner

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant