core-data

C# or windows equivalent of OS X's Core Data?

I'm late to the boat and have only just now started using Core Data in OS X / Cocoa - it's incredible and is really changing the way I look at things. Is there an equivalent technology in C# or the modern Windows frameworks? i.e. having managed data types where you get saving, data management, deleting, searching all for free? Also wo...

A fetch request can only fetch one entity at a time, right?

Is that true? Or could I fetch multiple entities at once? If so, how would that look like? (Guess: No. NSFetchRequest asks for one and only one entity) ...

How do I copy or move an NSManagedObject from one context to another?

I have what I assume is a fairly standard setup, with one scratchpad MOC which is never saved (containing a bunch of objects downloaded from the web) and another permanent MOC which persists objects. When the user selects an object from scratchMOC to add to her library, I want to either 1) remove the object from scratchMOC and insert int...

I need help with iPhone memory management and am willing to pay

I am looking for a Los Angeles based iPhone developer that would be willing to help tutor me on memory management and run down some code. Will pay for your time. Thanks, Sam ...

Which sorting algorithm is behind an NSSortDescriptor?

Is that thing using bubble sort? Or what exactly? How does it work in context with an NSFetchRequest of Core Data? ...

How is Core Data detecting the conflicts, actually?

Apple says about -detectConflictsForObject: If on the next invocation of save: object has been modified in its persistent store, the save fails. This allows optimistic locking for unchanged objects. Conflict detection is always performed on changed or deleted objects. So what does this mean? If I simply modify an manage...

Core Data Relationships in pre-populated SQLite database

Hi All, I'm new to Core Data. Currently I have following tables on hand: tbl_teahcer tbl_student tbl_course tbl_student_course_map ----------- ----------- ---------- ---------------------- teacher_id student_id course_id student_id name name name course_id ...

What are the correct bindings for an NSComboBox for use with Core Data

Imagine if you will a Core Data app with two entities (Employee, and Department). Employees have a to-one relationship with department (department) and the inverse is a to-many relationship (employees). In the UI you can select individual Employee entities and edit the details in a detail area (there are of course other attributes and th...

How to properly set relationships in Core Data when using setValue and data already exists

Let's say I have two objects: Articles and Categories with a many-many relationship between the two. For the sake of this example all relevant categories have already been added to the data store. When looping through data that holds edits for articles, there is category relationship information that needs to be saved. I was planning on...

create a sqlite database with data and move to the iphone application before installation

hi, I have around 100 plists in my application and I am planning to move that to a sqlite database. Is there a way to insert all these 100 plists into the database during the 'build' and make it available in the application after installation ? ...

Fault exception trashes a register causing a crash in [NSInvocation invoke]

I have an NSOperation which fetches some objects from a core data persistent store and sums up a few totals. Sometimes an object is deleted while the operation in in progress, so a core data fault exception occurs. I try/catch the exception while summing to ignore it because I just want to skip objects that cannot be faulted in. Howeve...

What's the consequence when Core Data detects an optimistic locking failure when trying to save?

I get it: When a managed object context saves, the snapshots of all edited objects are compared against the values in the persistent store to see if the PS has changed since the snapshot was made. If it did change, then there's a conflict and optimistic locking failed, according to Apple. But now, what's the consequence of this? What ha...

How to auto-increment reference number persistently when NSManagedObjects created in core-data.

In my application i am using core-data to store information and saving these data to the server using web-connectivity i have to use MySql. Basically what i want to do is to keep track of number of NSManagedObject already created and Whenever i am adding new NSManagedObject, based on that counting it will assign the class a Int_value whi...

Is this a bug in the documentation? -existingObjectWithID:error: or -objectWithID: seem to claim different things that don't match

From the docs: -existingObjectWithID:error: If there is a managed object with the given ID already registered in the context, that object is returned directly; otherwise the corresponding object is faulted into the context. This method might perform I/O if the data is uncached. Unlike objectWithID:, this method ...

What's the difference between -existingObjectWithID:error: and –objectWithID: ?

What's the difference between -existingObjectWithID:error: and –objectWithID: ? ...

In which situations does a managed object context have changes?

In which situations does a managed object context have changes? What can happen that -hasChanges returns YES? ...

Is Core Data using the Ghost pattern?

All this fault and faulting stuff appears to look pretty much like the Ghost pattern. Is that the same thing? ...

What happens when a fault is "fired"?

What happens when a fault is "fired"? ...

How to manually add Core Data to project?

E.g. what "Use Core Data for storage" checkbox option means when creating new Window or Navigation based project? How to add Core Data for Tab Bar Application? How to initialize managedObjectModel, managedObjectContext, persistentStoreCoordinator? ...

Doubts About Core Data NSManagedObject Deep Copy

Hello everyone, I have a situation where I must copy one NSManagedObject from the main context into an editing context. It sounds unnecessary to most people as I have seen in similar situations described in Stackoverflow but I looks like I need it. In my app there are many views in a tab bar and every view handles different information ...