1 Reply Latest reply: Jul 12, 2013 4:03 AM by Dimitar Slavov-Oracle RSS

    How to iterate over the attributes of a single entity?

    ceving

      I am working on a logical model transformation script. I take a list of all entities:

       

           var entities = model.getEntitySet().toArray();

       

      iterate over the entities:

       

           for (var e = 0; e < entities.length; e++) {

              var entity = entities[e];


      and try to get a list of all attributes for the current entity:

       

              var attributes = entity.getAttributeSet().toArray();

       

      After that I try to iterate over the attributes:

       

              for (var a = 0; a < attributes.length; a++) {

                  var attribute = attributes[a];

       

      While iterating over the attributes I realized that the list is always the same. I get always a list of all attributes probably of the whole model even for entities without any attribute.

       

      How can I get a list of the attributes for one single entity?