   addEnums: (metaModel) ->
     for thisMEnum in mEnum.getMEnums()
 
-      metaModel[thisMEnum.name] =
+      metaModel.push
         mType: Constants.ENUM
         name: thisMEnum.name
         type: thisMEnum.type


  # Builds the metaModel JSON object and returns it.
  createMetaModel: () ->
    metaModel = {}

    @addClasses metaModel
    @addReferences metaModel

  addClasses: (metaModel) ->
    for element in @graph.getElements()

      metaModel.push
        mType: Constants.CLASS
        name: @graph.getName element
        abstract: @graph.isAbstract element
