Set referencingRelationships = new PropertyListSet();
Set referencingRelationships = new HashSet();
  public Set getReferencingRelationships() {    Set referencingRelationships = new PropertyListSet();    Iterator modelsIter = getModel().getModelGroup().getModels().iterator();    while (modelsIter.hasNext()) {      EOModel model = (EOModel) modelsIter.next();      Iterator entitiesIter = model.getEntities().iterator();      while (entitiesIter.hasNext()) {        EOEntity entity = (EOEntity) entitiesIter.next();        if (!entity.equals(this)) {          Iterator relationshipsIter = entity.getRelationships().iterator();          while (relationshipsIter.hasNext()) {            EORelationship relationship = (EORelationship) relationshipsIter.next();            if (relationship.isRelatedTo(this)) {              referencingRelationships.add(relationship);            }          }        }      }    }    return referencingRelationships;  }