Core data just saving half of all information

Hello everyone,

I‘m trying to fetch JSON data from an url, building objects and saving them into core data. For example:

Code Block
{
code: 200,
data: [
{
„id“: 1,
„name“: „Peter“,
„age“: 35,
„email“: „peter@example.com“
},
{
„id“: 2,
„name“: „Tim“,
„age“: 62,
„email“: „tim@example.com“
},
...
]
}

„data“ contains „Person“ objects (or customers in my case containing name, address, etc. ... for example).

Unfortunately, there‘s only one of these values stored in CoreData (in my example the firstname of a Person or „name“ in this case). CoreData creates new „Person“ objects for each but only stores one of it‘s values only.

Do you have an idea why CoreData doesn‘t store everything and just a single value only? Everything else is always nil, I checked the debug.

Thank you in advance.



Replies

Core Data stores what you tell it to store. There are likely bugs in your code. You’ll have to post some code that demonstrates the issue before anyone can help.
Yeah I know. I solved it on my own, thank you.