List relationshipsList = entity.getRelationships(); children = relationshipsList.toArray(new EORelationship[relationshipsList.size()]);
List entityChildren = new LinkedList(); entityChildren.addAll(entity.getRelationships()); entityChildren.addAll(entity.getFetchSpecs()); children = entityChildren.toArray();
  public Object[] getChildren(Object _parentElement) {    Object[] children;    if (_parentElement instanceof EOModelEditorInput) {      EOModelEditorInput editorInput = (EOModelEditorInput) _parentElement;      children = new Object[] { editorInput.getModel() };    }    else if (_parentElement instanceof EOModel) {      EOModel model = (EOModel) _parentElement;      List entitiesList = model.getEntities();      children = entitiesList.toArray(new EOEntity[entitiesList.size()]);    }    else if (_parentElement instanceof EOEntity) {      EOEntity entity = (EOEntity) _parentElement;      List relationshipsList = entity.getRelationships();      children = relationshipsList.toArray(new EORelationship[relationshipsList.size()]);    }    else if (_parentElement instanceof EORelationship) {      EORelationship relationship = (EORelationship) _parentElement;      children = getChildrenRelationshipPaths(new EORelationshipPath(null, relationship));    }    else if (_parentElement instanceof EORelationshipPath) {      EORelationshipPath relationshipPath = (EORelationshipPath) _parentElement;      children = getChildrenRelationshipPaths(relationshipPath);    }    else {      children = null;    }    return children;  }