Serge Huber created UNOMI-32:
--------------------------------
Summary: Profile POST REST call overwrites existing profile in
storage
Key: UNOMI-32
URL: https://issues.apache.org/jira/browse/UNOMI-32
Project: Apache Unomi
Issue Type: Bug
Components: core
Affects Versions: 1.0.0-incubating, 1.0.1-incubating
Reporter: Serge Huber
Fix For: 1.0.1-incubating
Currently, if we receive a POST request on the ProfileServiceEndPoint.save
method, we will directly save the content in ElasticSearch. The problem is that
ES by default will always replace any existing entry, meaning that if it
contained data that was not sent in the POST request then we will loose profile
data.
We need to define whether it is the responsibility of the endpoint or the
ProfileService to check for existing data and merging it, but since we already
have update methods in the back-end it seems to me that the save method could
overwrite existing data and that the endpoint could take care of the needed
logic of merging, but this is open for discussion here.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)