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

nil in relationships #7

Closed
oks opened this issue Jul 1, 2014 · 9 comments
Closed

nil in relationships #7

oks opened this issue Jul 1, 2014 · 9 comments

Comments

@oks
Copy link

oks commented Jul 1, 2014

Maybe it bug comes from #6 , but what I got:

  1. I'm using mapping for NsManagedObject - let's call him myProfileEntity
  2. it has attributes, and 3 relationships, 1-1, and two 1-ToMany
  3. on first event - to myProfile I try to map data from json, where NO RELATIONSHIP data.
  4. got crash on assert in: FEMCache.m : line 110
    Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Expected container classes: NSArray, NSDictionary. Got:(null)

This issue comes from last pod update.
Can you suggest something ?
Thanks

@dimazen
Copy link
Contributor

dimazen commented Jul 1, 2014

Can you upload some sample code to gist?

@oks
Copy link
Author

oks commented Jul 1, 2014

I think problem is here -
for (FEMRelationshipMapping *relationshipMapping in mapping.relationshipMappings) {
id relationshipRepresentation = [relationshipMapping extractRootFromExternalRepresentation:objectRepresentation];
if (relationshipRepresentation)
{
[self inspectRepresentation:relationshipRepresentation usingMapping:relationshipMapping.objectMapping];
}
}
I just add if statement

@oks
Copy link
Author

oks commented Jul 1, 2014

Sure, give me a minute

@dimazen
Copy link
Contributor

dimazen commented Jul 1, 2014

Ok, got it.
The earliest fix date is today's evening.

@oks
Copy link
Author

oks commented Jul 1, 2014

Thanks,
https://gist.github.com/oks/8c31a1c8b6c0fd0663d5 - there are all examples.
Have a nice day

@oks
Copy link
Author

oks commented Jul 1, 2014

Also, will be cool to add debugDescription for FEMMapping class. :)

@dimazen
Copy link
Contributor

dimazen commented Jul 1, 2014

@oks you can send merge requests to help me ;)

@dimazen
Copy link
Contributor

dimazen commented Jul 2, 2014

fixed in 0.3.2

@dimazen dimazen closed this as completed Jul 2, 2014
@dimazen
Copy link
Contributor

dimazen commented Jul 20, 2014

@oks

Also, will be cool to add debugDescription for FEMMapping class. :)

Any thoughts on how description format should looks like?

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

2 participants