Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-13947

JDBC explicit repos multivalued properties are "stringified" to single value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not a defect
    • Affects Version/s: 7.0.0
    • Fix Version/s: 7.0.0
    • Labels:
    • Environment:
      OpenIDM 7.0.0-SNAPSHOT (1ed53a0)
      with mysql explicit table
    • Target Version/s:
    • Verified Version/s:
    • Story Points:
      2
    • Sprint:
      2020.01 - IDM

      Description

      system/groovy/account has email attribute configured as multivalued:

       	curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --header "Content-Type: application/json" --data '{"name":"bill","userName":"bill","lastName":"door","email":"bill@door.com","active":"true"}' --request POST "http://localhost:8080/openidm/system/groovy/account"
      
      Response Content:
      {"_id":"bill","_rev":"180101112233444","createDate":"180101112233444","active":true,"lastName":"door","email":["bill@door.com"],"name":"bill","userName":"bill"}
      

      Sync mapping has multivalued email mapped to singlevalued mail property.

                      {
                          "source" : "email",
                          "target" : "mail"
                      },
       

      and the mail property is defined like this:

          `mail` VARCHAR(255),
      

      Recon successfully passed.

      Then GET on managed/user returns the mail as string:

      curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin"  --request GET "http://localhost:8080/openidm/managed/user/bill"
      
      Response Content:
      {
      	"_id": "bill",
      	"_rev": "0",
      	"userName": "bill",
      	"mail": "[\"bill@door.com\"]",  <======= THIS
      	"password": null,
      	...
      	"userNameWork": null
      }
      

      To run automated test:
      Config.cfg: repo_type = mysql_explicit_table

      ./run-pybot.py -t openidm_action_to_launch_recon -n openidm

      Note, that this test will pass.

      Doing the same with DS explicit mapping throws conversion error during the recon.

        Attachments

          Activity

            People

            • Assignee:
              travis.haagen Travis Haagen
              Reporter:
              Ladislav.Folta Ladislav Folta
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: