We're updating the issue view to help you get more done. 

Logic for updating model objects forces passing of existing metadata

Description

The logic used for updating model objects does not preserve existing metadata values. The base class for create/update requests is MetadataProvider and it starts with an empty map. The common update logic treats an empty map as a request to remove all metadata (SITEWHERE-146). Instead of inheriting from MetadataProvider, the requests should have a getMetadata() method which starts with a null value.

  • If a null is passed, the existing metadata is left unchanged.

  • If an empty map is passed, all values are removed.

  • If a populated map is passed, the existing values are replaced with the provided values.

Environment

None

Status

Assignee

DerekA

Reporter

DerekA

Labels

None

Components

Fix versions

Priority

Major