gonzalezreal / Groot

From JSON to Core Data and back.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preserving order

scriptease opened this issue · comments

Hello,

first of all thanks for the great project!

I have a question, is it somehow possible to preserve the order in the json?
Since core data only provides sets it would be great to e.g. set an index in the relationship.

Is something like that possible?

Kind regards,
Florian

In these cases I just set the relationship as ordered in the model. Then it is parsed as NSOrderedSet and the JSON order is preserved.

Thanks, that works for relations :-), and for a list of root objects i just set the index manually!