Questions tagged [xcdatamodel]
113 questions
2
votes
1 answer
Prefixing CoreData generated classes
In my XCode project I have two data models (.xcdatamodel) and want to generate NSManagedObject-derived classes for the entities in each of these models. The problem is that both models contain an entity with the same name. How can I get these…

HairOfTheDog
- 2,489
- 2
- 29
- 35
2
votes
2 answers
Changing CoreData Model : retro compatibility
I've been hitting this problem with coredata and it's driving me nuts because it should be straight forwards
I'm currently working on the first release of this app, os obviously I keep tweeking the core data model here and there,
However each time…

Jason Rogers
- 19,194
- 27
- 79
- 112
2
votes
2 answers
Updata NSManagedObject class definition from datamodel
Being fairly new to CoreData (Started playing with it 2 hours ago ;) ) I keep wondering if there is an easier way to do things.
I'm currently using a DataModel to create my persistant objects code.
However when I keep adjusting things like number…

Jason Rogers
- 19,194
- 27
- 79
- 112
1
vote
0 answers
What Is xcdatamodel and what special steps must be taken to use source control with it?
I have had nothing but trouble with the .xcdatamodel in my XCode ios project.
I know it's a visual representation of my data model, but the XCode subversion support is weak at best, and whenever i want to attempt to merge or really do anything, if…

user798719
- 9,619
- 25
- 84
- 123
1
vote
1 answer
Can I split up a Core Data Model?
Our app consumes an API, and its data model has a set of entities which describe objects returned by that API, e.g. Categories and Locations. It also has a set of entities which describe ways the app uses those objects, e.g. Favourite Categories…

Simon
- 25,468
- 44
- 152
- 266
1
vote
3 answers
Core Data Error
I am creating an application using Core Data. But When I run my app it crashes. It shows me this reason:
reason = "The model used to open the store is incompatible with the one used to create the store";
What should I do now?

Purva
- 1,291
- 2
- 15
- 30
1
vote
1 answer
Retrieving data from core data
I'm using an xcdatamodel to define a number of classes based upon CoreData data entities. This is working great and I can retrieve them in accordance to Apple's…

mac_55
- 4,130
- 7
- 31
- 40
1
vote
2 answers
Programmatically create attribute - Core Data
i have a simple iphone project which contains a simple xcdatamodel that has a single entity
with roughly 3 attributes..
i want to know if there is a way to programmatically add an attribute to an entity..
i.e. if the user presses an "add" button of…

Ibz
- 518
- 1
- 8
- 26
1
vote
1 answer
returnsObjectsAsFaults not working as expected
I created a Core Data object as follows:
@objc(Gates)
public class Gates : NSManagedObject {
public class func getFetchRequest() -> NSFetchRequest {
let request = NSFetchRequest(entityName: "Gates")
…

Emil Adz
- 40,709
- 36
- 140
- 187
1
vote
0 answers
Case sensitivity in Excel Data Model
Does anybody know how to avoid error "The relationship cannot be created because each column contains duplicate values. Select at least one column that contains only unique values" in Excel Data model - data model consider idXYZ identical to…

istee1
- 21
- 5
1
vote
0 answers
Fetching request returning nil after migration with renaming ID
I have a problem with my migration, for exemple:
Version1:
Column aa (renaming ID: none)
Column bb (renaming ID: none)
Column cc (renaming ID: none)
Version2:
Column ab (renaming ID: aa)
Column bb (renaming ID: none)
Column cc (renaming ID:…

Ben
- 761
- 1
- 12
- 35
1
vote
0 answers
Core Data failing automatic lightweight migration
I'm crashing every time Core Data tries to do an automatic lightweight migration after making a new version of the model (let's call it "Model 2.6") in my app (currently using "Model 2.5").
I've been working with Core Data for a while now, and I'm…

Lightbow
- 143
- 1
- 6
1
vote
1 answer
When should I increase xcdatamodeld version?
someone please explain when should I increase the xcdatamodeld version? I google a lot, there are all about migration, but when should I increase the version?
Currently if I make change in my xcdatamodeld such as add entity or add attribute, I will…

Magrider
- 51
- 6
1
vote
1 answer
Versioned XCDatamodel couldn't be open, the file .contents is missing
I had a running Project which worked fine before push it to remote origin. Now I formatted my disk and checked out this project an I get the Error:
_MyModelDB 3.xcdatamodel: Failed to read data model Error Domain=NSCocoaErrorDomain Code=256 "The…

feldeOne
- 417
- 3
- 18
1
vote
0 answers
Getting the current version of Datamodel Core data
Is method to get the version number of data model from the application. In my application already version 2-3 migration is done and I am adding a new version to the data model. So I need to handle the migration, I need to do the 2-3 first and then…

Govind
- 2,337
- 33
- 43