Uploaded image for project: 'Apache Unomi'
  1. Apache Unomi
  2. UNOMI-132

ProfileServiceImpl mergeProfiles for nested profile properties

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • unomi-1.5.5
    • None
    • None

    Description

      When merging profiles unomi does not look for profile properties that are nested.

         "properties": {
              "nbOfVisits": 1,
              "lastVisit": "2017-10-25T20:04:49Z",
              "group": {
                  "user_ids": {
                      "site_1": "123_user_id"
                  }
              },
              "firstVisit": "2017-10-25T20:04:49Z",
          }
      

      When this profile gets merged, unomi looks for the properties on line 458 in ProfileServiceImpl.

      allProfileProperties.addAll(profile.getProperties().keySet());
      

      The keySet() will only include "group", not the values nested inside. So we cannot define a mergeRule for the values inside.

      How can we merge two profiles with different user_id values?

      Current work around is to use

       group_user-id_site-1 : "123_user_id" 

      instead of the nested property.

      Any thoughts or is this a new use case?

      Thanks,
      Donnie

      Attachments

        Activity

          People

            Unassigned Unassigned
            donald_kortx Don Hinshaw
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: