About the Core Data Model Editor

If you are using Core Data to manage the data in your application, the Core Data model editor provides graphical and table-based tools to edit your managed object model. The managed object model is a representation of the schema that describes your model objects, including the relationships between them.

The model editor area is made up of two components:

  • The top-level components area

  • The detail area


The top-level components area lists the entities, fetch requests, and configurations defined in the model. You can select one or more items at a time within a single group.

You use the Add Entity button to add an entity, fetch request, or configuration. To add a fetch request or configuration, click and hold the Add Entity button until it shows the other options. The button retains the label from the last time it was used.

The detail area shows the attributes, relationships, and fetched properties associated with the item or items you select in the top-level components area. You can select one or more items from the same group at the same time.

There are two modes for the detail area: table and graph. Use the segmented control at the lower right of the model editor area to select the mode. You can use only the graph mode if you select an entity in the top-level components area.

You can use either mode to edit the model. However, the table mode is typically better for detailed editing and inspection, and the graph mode is better for visualizing your schema.

The Core Data Model inspector in the utility area displays information about the item or items you select in the detail area. By making a multiple selection in the detail area, you can edit several properties at the same time. For example, you can set the Attribute Type for a number of attributes simultaneously.