Documentation Archive Developer
Search
PATH  WebObjects 4.5 Documentation > EOAdaptor Reference

Table of Contents

EOModel



Loading a Model File

EOModels are usually loaded from model files built with the EOModeler application rather than built programmatically. EOModel files are typically stored in a project or a framework.

To load an EOModel, provide a model file's path to the constructor. Note that loading an EOModel doesn't have the effect of loading all of its entities. EOModel files can be quite large, so to reduce start-up time, entity definitions are only loaded as needed. This incremental model loading is possible because an EOModel actually consists of one index file and two files for each entity. Models have an .eomodeld file wrapper (which is actually a directory), and the individual entity files within the model are in ASCII format. The index file has the name index.eomodeld, and it contains the connection dictionary, the adaptor name, and a list of all of the entities in the model. It is this file that gets loaded when you create a new model from a pathinitWithContentsOfFile:. When an entity is loaded, EOModel posts an EntityLoadedNotification. The entity files are a .plist file that describes the entity and a .fspec file that describes any named fetch specifications for that entity.

Some of the EOModel methods contain the string "TableOfContents". An EOModel's "table of contents" corresponds to its index.eomodeld file, which is used to access the model's entities. index.eomodeld is just the ASCII representation of a model's table of contents.


Table of Contents