Relative Content

Tag Archive for objective-ccore-data

Core data inappropriately turns managed objects into faults

My app maintains Folder objects (an NSManagedObject subclass). Each folder may have subfolders of the same class (an ordered to-many relationship, the reciprocal relationship is called parent). Folders also have a name attribute (NSString).
These folders show in an NSOutlineView and can be rearranged by the user. Their managedObjectContext is the “view context” of the application (using the main queue). Each Folder shown in the outline view is the objectValue of a table cell view, and is therefore retained so long as the table cell view is alive.

Core data inappropriately turns managed objects into faults

My app maintains Folder objects (an NSManagedObject subclass). Each folder may have subfolders of the same class (an ordered to-many relationship, the reciprocal relationship is called parent). Folders also have a name attribute (NSString).
These folders show in an NSOutlineView and can be rearranged by the user. Their managedObjectContext is the “view context” of the application (using the main queue). Each Folder shown in the outline view is the objectValue of a table cell view, and is therefore retained so long as the table cell view is alive.

How do I create a simple database table of attributes of NSManagedObjects using Core Data and Objective-C?

I am trying to create a simple database table of records using Core Data and Objective-C. I understand that instances of NSManagedObject is what I store those records in, but how many entity records can I store in a single NSManagedObject? If only one, then how do I declare multiple instances of NSManagedObjects with unique identifiers for, in this example ‘entityObj’, which must be provided by the user at runtime?