Declared in: EOAccess/EOModelGroup.h
An EOModelGroup object should have a delegate which can influence how it finds and loads models. The EOModelGroup instance delegate can implement the methods below:
In addition to the delegates you assign to EOModelGroup instances, the EOModelGroup class itself can have a delegate. The class delegate implements a single method- defaultModelGroup. For more information, see the EOModelGroup Class Delegate protocol description.
Used to fine-tune inheritance. The delegate
can use globalID to determine a subclass
to be used in place of the one specified in entity.
Invoked when the class name specified for entity
cannot be found at run-time. The delegate can take action (such
as loading a bundle) to provide entity with a class corresponding
to className. If the delegate cannot
provide anything, or if there is no delegate, EOGenericRecord is
Invoked when relationships are instantiated
for a newly fetched object. The delegate can use the information
in row to determine which entity the target enterprise object should
be associated with, and replace the relationship appropriately.
- (EORelationship *)entity:(EOEntity
If implemented by the delegate, this method
should search the group for the entity
named name and return the entity's
EOModel. Return nil if name is not
an entity in group.
- (EOModel *)modelGroup:(EOModelGroup
Invoked when loading relationship and the destination
entityName specified in the model file cannot be found in the model
group. This most often occurs when a model references entities in
another model file that can't be found. If the delegate doesn't
implement this method, an exception is raised. If the delegate does
implement this method, the method's return value is set as the
destination entity. if the delegate returns nil, the destination
entity is set to nil.
- (EOEntity *)relationship:(EORelationship
Allows the delegate to fine-tune inheritance
by indicating from which sub-entity an object should be fetched
based on its primaryKey. The entity returned must be a sub-entity
of entity. If the delegate knows
that the object should be fetched from the returned entity and not
one of its sub-entities, it should set flag to
- (EOEntity *)subEntityForEntity:(EOEntity