title: eclipselink struct fields order
body: <p>I am working on a EclipseLink application, which uses Oracle Objects as IN and OUT parameters (while invoking stored procedure). As you know we have @Struct annotations available in Eclipselink for representing Oracle Object, I used it and it is working perfectly. But, looks like order of the fields declared in Struct annotated class matters a lot to map to correct field in oracle object. This causes maintenance issues and very difficult to code when object's properties are more. Is there a way in Eclipselink to say map Structure fields based on name and not with order.</p>
  
  <p>Ex: Below is my Struct class. If by chance I declare variables in different order from fields list, wrong/incorrect mappings will happen while fetching records from stored proc. Its always mapping values to fields from top to bottom. @Column name annotation is not able to solve this issue.</p>
  
  <pre><code>        @Struct(name = "REC_OBJECT",
              fields = {"TRANS_ID", "PROJECT_ID", "LANGUAGE_CODE", "DESCRIPTION"})
      @Embeddable
      public class Master {
  
          @Column(name = "PROJECT_ID")
          private String projectId;
  
          @JsonIgnore
          @Column(name = "TRANS_ID")
          private String transactionId;
  
          @Column(name = "LANGUAGE_CODE")
          private String languageCode;
  
          @Column(name = "DESCRIPTION")
          private String description;
  
  }
  </code></pre>
  
  <p>Please suggest solution for this. Thank you.</p>