I know that one of these questions is in the million SO, but this is different, and I'm stumped.
I have a data model with about a dozen entities about it. The code is just fine, then I've modeled the model, added a unit and a relationship, then the existing version data in the ExDocumented file Updating the settings for the model and now NSInternalInconsistencyException is happening while trying to use the new organization.
In my main VC I login, continuously store coordinator, managed object model, and all the institutions log in. I hope everything is visible in the unit I am trying to use.
I have removed SQLite DB, and recreate the core data, and see the table with the right column types. / P>
Everything looks fine.
This is the fetching code:
- fetchMissions {NSFetchRequest * request = [[NSFetchRequest alloc] init]; NSEntityDescription * entity = [NSEntityDescription EntityForName: @ Managed Object Contains in "Mission": self.managedObjectContext]; NSSortDescriptor * sortDescriptor = [[NSSortDescriptor alloc] initWithKey: @ "title" ascending: yes]; NSArray * sortDescriptors = [[NSArray alloc] initWithObjects: sortDescriptor, zero]; [Request setEntity: unit]; [Request Associate Circuit: Sort Descriptor]; NSError * Error = Zero; Mission Hour = [[Himself. Managed object contact executeFetchRequest: Request error: & amp; Error] mutableCopy]; } Here is the output:
NSLog (@ "Units:% @", [[Self management] Object context.PrinterStore Coordinator Managed Object Model Institutions] valueForKey: @ "name"]); Units: (Characters, Characters, Cracked Conditions, Character Objective, Character Process, Condition, Mission, Object, Presentation, PlayerCactor, Scoreboard) When I print out, Also see with the entire managed object model:
NSLog (@ "MOM:% @", self-managed object context.intstore coordinator. Managed Object Model); The entity is dead simple ... 3 columns, there are two text / string and an integer The unit description in the model editor matches the table definition in SQLite. What am I missing ??
OK, so I'm an idiot ...
In my view The MOC did not have to grab the deedload because I was in another VC, so when I was printing the correct MOC with the representative,
Fixed.
Thanks for listening. :)
Comments
Post a Comment