Questions tagged [nsmanagedobjectmodel]

An NSManagedObjectModel object describes collection of entities that you use in your application. It is available in OS X v10.4 and later and available in iOS 3.0 and later .

56 questions
0
votes
2 answers

"NSInternalInconsistencyException" Entities for a configuration must already be in the model

I am trying to add a new entity in NSManagedObjectModel in my NSIncrementalStore Subclass. I am doing this in loadMetadata method but it keeps throwing this exception on the last line. See Code Below "NSInternalInconsistencyException" Entities for a…
0
votes
1 answer

A way to persist a duplicate version of the core data model temporarily

This is a bit of a tough question to explain. I've been looking for an answer to this over two weeks but I couldn't find a solution for this use case. Before I get into the nitty gritty details, please have a look at this image. The user is…
Isuru
  • 30,617
  • 60
  • 187
  • 303
0
votes
1 answer

Runtime-generated Custom NSManagedObjectModel for NSPersistentDocument

I have a document-based (OS X) app that uses Core Data, so the document is a subclass of NSPersistentDocument. When the user creates a document, s/he specifies a setting that determines the number of attributes a particular entity in the managed…
user2105505
  • 686
  • 1
  • 9
  • 18
0
votes
1 answer

What is the relationship between NSManagedObject subclasses and the xcdatamodeld file?

I started creating entities in the xcdatamodeld (xcdatamodel) file. I subclassed entities using the Create NSManagedObject Subclass… menu entry. I added custom code to these subclasses. If i want to make changes (like add/remove an attribute, a…
MartinW
  • 4,966
  • 2
  • 24
  • 60
0
votes
1 answer

How does the save method in Core Data works?

I'm following a guid in core data, and they implement an action method to preform saving to the database using a ManagedObject. I understand all the code in the method except the method which they say preform the saving, and to me it looks like the…
JohnBigs
  • 2,691
  • 3
  • 31
  • 61
0
votes
1 answer

Why does my NSManagedDataModel have no entities after I add another version of the DataModel?

Why does my NSManagedDataModel have no entities after I add another version of the DataModel? MacBook Pro Late 2008, OS X 10.8.5, Xcode 5.0.2, Project has two apps, one OS X, one iOS, both share a datamodel Recently add a new dataModel…
mbarron
  • 285
  • 4
  • 15
0
votes
1 answer

Programmatically Setting Up Core Data - Where Does NSManagedObjectContext Come From?

I want to set up Core Data entirely programmatically. I've defined a database schema in the form of an NSManagedObjectModel and added some entity definitions in the form of NSEntityDescription's as is done at the bottom of this page. All is well…
0
votes
1 answer

Core data save model not working iOS

I have created a core data model and when trying to save records I get the following console message: Unresolved error Error Domain=NSCocoaErrorDomain Code=134100 "The operation couldn’t be completed. (Cocoa error 134100.)" UserInfo=0x8b3bc50…
0
votes
1 answer

Right Usage of NSManagedObjects in Core Data

I'm currently diving further into Core Data and have some minor confusion about using Core Data NSManagedObject Models. For example, I would have a "Contact" Entity that has properties such as firstname, lastname, address, etc... What I'm trying to…
Shai Mishali
  • 9,224
  • 4
  • 56
  • 83
0
votes
1 answer

Core Data Model Subclassing (Not NSManagedObject subclassing)

I would like to know if anyone knows if it is possible to subclass a Core Data Model. In my case I am developing a library that I would like to use in 2 projects. Both projects have nearly the same Data Objects that i would like to outsource into…
JulianM
  • 2,540
  • 18
  • 13
0
votes
1 answer

How to identify Core Data Managed Object Model -- hash?

Is there a method to get a unique hash for a Core Data Managed Object Model, so that I can see if the core data store is up-to-date with a specific model? I am building a core data sync system, and I want to make sure that the core data stores which…
Jason
  • 14,517
  • 25
  • 92
  • 153
1 2 3
4