entityMap.put("internalInfo", internalInfoMap);
entityMap.setMap("internalInfo", internalInfoMap, false);
  public EOModelMap toEntityMap() {    EOModelMap entityMap = myEntityMap.cloneModelMap();    entityMap.setString("name", myName, true); //$NON-NLS-1$    entityMap.setString("externalName", myExternalName, true); //$NON-NLS-1$    entityMap.setString("className", myClassName, true); //$NON-NLS-1$    if (myParent != null) {      entityMap.setString("parent", myParent.getName(), true); //$NON-NLS-1$    }    entityMap.setBoolean("cachesObjects", myCachesObjects); //$NON-NLS-1$    entityMap.setBoolean("isAbstractEntity", myAbstractEntity); //$NON-NLS-1$    entityMap.setBoolean("readOnly", myReadOnly); //$NON-NLS-1$    entityMap.setString("restrictingQualifier", myRestrictingQualifier, true); //$NON-NLS-1$    entityMap.setString("externalQuery", myExternalQuery, true); //$NON-NLS-1$    entityMap.setInteger("maxNumberOfInstancesToBatchFetch", myMaxNumberOfInstancesToBatchFetch); //$NON-NLS-1$    //Map fetchSpecifications = _entityMap.getMap("fetchSpecificationDictionary");    // TODO: Fetch Specs    List classProperties = new LinkedList();    List primaryKeyAttributes = new LinkedList();    List attributesUsedForLocking = new LinkedList();    List clientClassProperties = new LinkedList();    List attributes = new LinkedList();    Iterator attributeIter = myAttributes.iterator();    while (attributeIter.hasNext()) {      EOAttribute attribute = (EOAttribute) attributeIter.next();      EOModelMap attributeMap = attribute.toMap();      attributes.add(attributeMap);      if (attribute.isClassProperty() != null && attribute.isClassProperty().booleanValue()) {        classProperties.add(attribute.getName());      }      if (attribute.isPrimaryKey() != null && attribute.isPrimaryKey().booleanValue()) {        primaryKeyAttributes.add(attribute.getName());      }      if (attribute.isUsedForLocking() != null && attribute.isUsedForLocking().booleanValue()) {        attributesUsedForLocking.add(attribute.getName());      }      if (attribute.isClientClassProperty() != null && attribute.isClientClassProperty().booleanValue()) {        clientClassProperties.add(attribute.getName());      }    }    entityMap.setList("attributes", attributes); //$NON-NLS-1$    List relationships = new LinkedList();    Iterator relationshipIter = myRelationships.iterator();    while (relationshipIter.hasNext()) {      EORelationship relationship = (EORelationship) relationshipIter.next();      EOModelMap relationshipMap = relationship.toMap();      relationships.add(relationshipMap);      if (relationship.isClassProperty() != null && relationship.isClassProperty().booleanValue()) {        classProperties.add(relationship.getName());      }    }    entityMap.setList("relationships", relationships); //$NON-NLS-1$    entityMap.setList("attributesUsedForLocking", attributesUsedForLocking); //$NON-NLS-1$    entityMap.setList("classProperties", classProperties); //$NON-NLS-1$    entityMap.setList("primaryKeyAttributes", primaryKeyAttributes); //$NON-NLS-1$    Map internalInfoMap = entityMap.getMap("internalInfo"); //$NON-NLS-1$    if (internalInfoMap == null) {      internalInfoMap = new HashMap();      entityMap.put("internalInfo", internalInfoMap); //$NON-NLS-1$    }    internalInfoMap.put("_clientClassPropertyNames", clientClassProperties); //$NON-NLS-1$    entityMap.put("userInfo", myUserInfo); //$NON-NLS-1$    return entityMap;  }