Uploaded image for project: 'Webservices REST Module'
  1. Webservices REST Module
  2. RESTWS-460

Submitting back a full representation of metadata fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.12
    • Component/s: None

      Description

      I'm trying to create an encounter via REST and I do something like:

      var encounterType = {
          // full representation
      };
      var encounter = {
          encounterType: encounterType,
          // many more properties
      }
      post('.../ws/rest/v1/encounter', encounter);
      

      This fails with a NPE at BaseDelegatingResource:768 because it can't find a setter on EncounterType for "auditInfo" (which I'm submitting back, as it's part of the full representation).

      We need to do some fundamental refactoring such that submitting things we fetch from web services back as properties of a new object does not fail.

      PS- the client-side workaround is easy:

      var encounter = {
          encounterType: encounterType.uuid,
          // ...
      }
      // etc
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              dkayiwa Daniel Kayiwa
              Reporter:
              darius Darius Jazayeri
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: