Skip to content

Duplicated records using importFromObject with custom classes, even though relatedByAttribute is set correctly#1223

Open
ricardopaiva wants to merge 1 commit intomagicalpanda:release/3.0from
ricardopaiva:release/3.0
Open

Duplicated records using importFromObject with custom classes, even though relatedByAttribute is set correctly#1223
ricardopaiva wants to merge 1 commit intomagicalpanda:release/3.0from
ricardopaiva:release/3.0

Conversation

@ricardopaiva
Copy link
Copy Markdown

I'm using a library that receives a JSON file from a API and creates custom classes from JSON.
I'm using the importFromObject to persist those custom classes (not NSDictionary) in Core Data and I'm having problems with duplicated records being created.
After some debugging I've discovered an issue with MagicalRecord. With the changed in this pull request, the relationship defined in the model is respected and the object is not duplicated.

Please let me know if a sample project is needed.

Regards

@Coeur Coeur added this to the 3.0.0 milestone May 31, 2019
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

Successfully merging this pull request may close these issues.

2 participants