Skip to content


Strange (as for me) behavior or bug with saving #174

yas375 opened this Issue · 3 comments

2 participants


In my app I'm trying to create new photo and associate it with existent category. And after that I'm trying to fetch all other photos, not in this category.

The problem is that I got this new and just added to category photo also in this list. But photo already in this category and after application restart it will not be able in this request.

So at first it seems that something is not saving, but I'm saving context after photo creation and after adding photo to category too. And I tried to save with save and saveNestedContexts but nothing changed.

So, I've created simple app with just needed staff to reproduce this error. Here's it is:

Test code in AppDelegate:

And here is a little screencast which is demonstrates this strange behavior:

One more thing to pay attention: object ids of already created photos are like:


but new photo which I've just created and already saved has next kind of objectid: <x-coredata:///Photo/t3CF2DEA9-7237-4126-B414-DC2148FC3ACB2>. But after restarting the application photos' objectID changed to usual format.

What's wrong?

thanks in advance


if it will be acceped as a bug than I could try write a test for this. I already looked at tests in magical record and this task seems interesting and possible for me)


I've downgraded MagicalRecord to 1.8.3 version in my test app and it is working!! I've commited it as separate branch So the issue occurs with MagicalRecrd 2.0.3

@blackgold9 blackgold9 closed this

I've also just retested it with the latest version of MagicalRecord and the issue is gone =)
thanks everyone)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.