EOModelGroup group = EOModelGroup.modelGroupForObjectStoreCoordinator((EOObjectStoreCoordinator)ec.rootObjectStore()); EOEntity entity = group.entityNamed(entityName);
EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName);
    public static EOFetchSpecification primaryKeyFetchSpecificationForEntity(EOEditingContext ec,                                                                      String entityName,                                                                      EOQualifier eoqualifier,                                                                      NSArray sortOrderings,                                                                      NSArray additionalKeys) {        EOModelGroup group = EOModelGroup.modelGroupForObjectStoreCoordinator((EOObjectStoreCoordinator)ec.rootObjectStore());        EOEntity entity = group.entityNamed(entityName);        EOFetchSpecification fs = new EOFetchSpecification(entityName, eoqualifier, sortOrderings);        fs.setFetchesRawRows(true);        NSMutableArray keys = new NSMutableArray(entity.primaryKeyAttributeNames());        if (additionalKeys != null) {            keys.addObjectsFromArray(additionalKeys);        }        fs.setRawRowKeyPaths(keys);        return fs;    }