Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
yas375 opened this Issue · 3 comments

2 participants

@yas375

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: https://github.com/yas375/MagicalRecordPayload/

Test code in AppDelegate: https://github.com/yas375/MagicalRecordPayload/blob/master/MagicalRecordPayload/MRPAppDelegate.m#L24

And here is a little screencast which is demonstrates this strange behavior: http://screencast.com/t/GW487aJl03b

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

<x-coredata://03169FD4-734F-4468-BD9F-743354E0FCCB/Photo/p1>
<x-coredata://03169FD4-734F-4468-BD9F-743354E0FCCB/Photo/p2>
<x-coredata://03169FD4-734F-4468-BD9F-743354E0FCCB/Photo/p3>
<x-coredata://03169FD4-734F-4468-BD9F-743354E0FCCB/Photo/p4>

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

@yas375

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)

@yas375

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
@yas375

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.