EOEntity entity = EOModelGroup.modelGroupForObjectStoreCoordinator((EOObjectStoreCoordinator)ec.rootObjectStore()).entityNamed(entityName);
EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName);
    public NSArray enterpriseObjectsForEntityNamedFromFormValues(EOEditingContext ec, String entityName, NSDictionary formValues) {        NSDictionary groups = groupedEnterpriseObjectsFromFormValues(ec, formValues);        EOEntity entity = EOModelGroup.modelGroupForObjectStoreCoordinator((EOObjectStoreCoordinator)ec.rootObjectStore()).entityNamed(entityName);        NSMutableArray entityGroup = new NSMutableArray();        if (entity != null && entity.isAbstractEntity()) {            for (Enumeration e = ERXUtilities.allSubEntitiesForEntity(entity, false).objectEnumerator(); e.hasMoreElements();) {                EOEntity subEntity = (EOEntity)e.nextElement();                NSArray aGroup = (NSArray)groups.objectForKey(subEntity.name());                if (aGroup != null)                    entityGroup.addObjectsFromArray(aGroup);                    }        } else {            entityGroup.addObjectsFromArray((NSArray)groups.objectForKey(entityName));                    }        return entityGroup != null ? entityGroup : NSArray.EmptyArray;    }