Entity concept
In one sentence
The entity concept supports the mapping of a remote data storage to EOEnterpriseObjects, by giving the remote data source a name.
In a picture
This graphic shows a possible scenario, where remote data of an entity (Foo) is mapped to an Objective-C class or entity data (Bar, Baz) is merely fetched to reside in EOGenericRecords.
In more sentences
In EOF there are methods on EOClassDescription called -entityName and EOFetchSpecification also describes fetches on entities. If you consider just EOControl without EOAccess, which is a framework layered on top of EOControl it's not really clear what an entity really is and where the objects are supposed to be fetched from. For the latter question refer to The EOObjectStore and EOEditingContext hierarchy.
context = [[EOEditingContext new] autorelease];
fetch = [EOFetchSpecification fetchSpecificationWithEntityName:@"SomeEntity"
qualifier:nil
sortOrderings:nil];
array = [context objectsWithFetchSpecification:fetch];
First one should remember that objects are always unique to an EOEditingContext, never shared. "Two EOEditingContexts" or "an EOEditingContext and an EOObjectStore" must not share the same object. During a fetch the EOObjectstore is instantiating objects on behalf of the EOEditingContext, it's not the EOEditingContext who is creating the objects. The objects are merely registered in that EOEditingContext.
Now since objects are unique and its data is therefore copied anyway, it's not really necessary that the source of the data to construct the copy must be of the same class. In fact it doesn't need to be a class at all, it could be a PropertyList or a row from a database table. And that's where the entity concept comes in. The entity names this, on the EOControl abstraction level, unknown data source.
Therefore the entity concept of EOControl is a broader, than what's expressed by EOEntity of EOAccess. EOEntity is a concrete class that describes the mapping between a SQL storage and Objective-C classes.
If the data of an entity can or should not be mapped to an Objective-C class, one can use an EOGenericRecord to hold its data. Nevertheless an EOGenericRecord has a EOClassDescription that describes it's. Very curious.
Question: Does EOClassDescription describe the entity or the class ?
