-
Notifications
You must be signed in to change notification settings - Fork 78
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
Using FEMMapping as NSMapTable key leads to duplicated objects #96
Comments
Can you share code of the mapping that you're using as well as some sample JSON, please? |
Side note about why I rewrote code to use |
Here is simplified version: Chat:
Message:
JSON:
|
Sure, |
And also, I know that we can't do much about it now, but I think it would be much nicer if there was bug fixes release before Realm support. We wanted to get temporary fix for #80 but had to include whole Realm support as well, which in the end it seems broke some of functionality. |
Agree, that to rollout a bugfix release would be a better option. Anyway it is a little bit late. |
I'll try to release a hotfix within 1.5 hours |
Observation: @jcavar do you have an inverse relationship? It looks like that you're trying to map |
@jcavar this issue has been fixed in the 1.2.1 release. |
@dimazen thank you, that was fast 👍 Yes, we have inverse relationship from message to chat. |
@jcavar what I meant by my observation is that you probably don't need nested Chat mapping, since Message already included into the Chat and by using inverse relationship CoreData will be able to set a correct chat value on the message object. In any case thanks for your report! |
Yes, that is good point, but we have explicitly disabled inverse relationship in CoreData editor for some reason. |
Got it. Good luck with your project 👍 |
Hi,
It new version, FEM uses
FEMMapping
instead entity name as before asNSMapTable
key. When using recursive relationships and therefore differentFEMMapping
in child object and when processing child, it tries to get object from cache but since child mapping is different it can't get it and inserts new object.Simple solution is I think just to use
mapping.entityName
as key.The text was updated successfully, but these errors were encountered: