wso2 / carbon-device-mgt

Apache License 2.0
53 stars 113 forks source link

Persisting profile operations as string values instead of Objects #1264

Closed ruwany closed 5 years ago

ruwany commented 5 years ago

Purpose

Persisting profile operations as objects lead to serialization issues every time an object is updated, this was solved by adding a serializationID, however storing objects itself leads to redundancies as the same set of values are stored in multiple locations.

Approach

Only the string payload pertaining to profile operations will be stored henceforth in the blob, when retrieving operations, it will be checked to see if the value in question is an instance of String, if not it will be assumed to be a profile operation object (as per legacy implementation). This will make the code backward compatible.