You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using CoreData and we encountered problem when transforming this. Chat with identifier 1 is created twice. I think we identified why is this happening:
So the issue is in FEMDeserializer.m - (id)_objectFromRepresentation:(NSDictionary *)representation mapping:(FEMMapping *)mapping allocateIfNeeded:(BOOL)allocate.
If object is not in cache, it is inserted and then filled from external representation. When filling it, inner chat is encountered and not found in cache and inserted as well. So we end up with 2 same chats.
The issue could be solved by caching object before calling fillObject.
I hope this makes sense? Is this something that FastEasyMapping should handle?
Hello, @jcavar! Thanks for your issue! It looks like that FEM can handle this easily. Anyway primary key mapping has some specific rules and thus can be extracted from the object fulfilling method.
@jcavar you can now use 1.1.2 version that contains this fix. #80 postponed until 1.2 that I'm currently working on. It looks like that you gonna split your data into chunks, therefore I've decided to combine errors handling with new major release.
Activity
jcavar commentedon Mar 31, 2017
So we would need to set primary key and cache before fill object which would look something like this:
dimazen commentedon Mar 31, 2017
Hello, @jcavar! Thanks for your issue! It looks like that FEM can handle this easily. Anyway primary key mapping has some specific rules and thus can be extracted from the object fulfilling method.
I'll fix it later today if it works for you :)
jcavar commentedon Mar 31, 2017
Well that was fast response 👍. Sure it works :)
Merge pull request #82 from Yalantis/fix/GH-81
dimazen commentedon Apr 2, 2017
I'll roll out update with fix later this morning (third of April)
dimazen commentedon Apr 3, 2017
@jcavar you can now use 1.1.2 version that contains this fix.
#80 postponed until 1.2 that I'm currently working on. It looks like that you gonna split your data into chunks, therefore I've decided to combine errors handling with new major release.
ping me if you have more issues :)
jcavar commentedon Apr 3, 2017
Nice, thank you :)