magicalpanda / MagicalRecord

Super Awesome Easy Fetching for Core Data!
Other
10.8k stars 1.79k forks source link

Having Loads of Problems with MR3.0 #1210

Open wahkiz opened 8 years ago

wahkiz commented 8 years ago

Recently I have been having lots of random crashes with 2.3 in crashlytics that I have pulled the trigger and updated to 3.0. Worst decision ever. Nothing works now.

First of all, all the [NSManagedObject MR_context] no longer works, it just plain crashes if I uses any of those contexts, it works fine if I just do a [.. MR_findAll], but if I use [.. MR_findAllInContext:ctx] it will just crash. I already set a default stack in Appdelegate, doesn't this assume that if I ask for a new context, it will just use the default stack?

So I do some reading up on this new "stack concept". I changed my code to [[MagicalRecordStack defaultStack] newConfinementContext], Okay, it seems to work now, it no longer crashes on the finding part. But wait, the object data shows up right after the findAllInContext. But after storing it in a variable and accessing it later, all data in the NSManagedObject becomes fault, so everything just becomes null. What's the deal with this? How am I suppose to work with managed objects in 3.0? This is all working code in 2.3.

The documentation on 3.0 is so horrible that ... , scratch that, it is non existent. I searched high and low in google and there's nothing explaining how stacks work in MR3, aside from the few paragraphs in the Concepts wiki.

Don't take this personally, I am just asking in advance for the salvation of future users of MR3, because they are bound to face similar problems, and hopefully we can get some answers here.

deepakdhanaie commented 7 years ago

Hi wahkiz, Hope you doing well, I was using MR2.3 but faced some UI Freezing issues therefore i decided to switch MR3.0 and it was pretty smooth and fast saving and no freezing but then there was duplicates records, though i'm using relatedByAttributed but still getting the issue. Could you help with that if you have used MR3.0.