EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName); while (entity.parentEntity() != null) { entity = entity.parentEntity(); } entityName = entity.name();  Long pk = getNextPkValueForEntity(entityName); return new NSDictionary(new Object[] { pk}, new Object[] { "id"});
return primaryKeyDictionary(entityName);
    public static NSDictionary primaryKeyDictionary(EOEnterpriseObject eo) {        String entityName = eo.entityName();        EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName);        while (entity.parentEntity() != null) {            entity = entity.parentEntity();        }        entityName = entity.name();        Long pk = getNextPkValueForEntity(entityName);        return new NSDictionary(new Object[] { pk}, new Object[] { "id"});    }