Allen Liang created ATLAS-4752:
----------------------------------

             Summary: A default value is always assigned when an optional 
attribute is not set
                 Key: ATLAS-4752
                 URL: https://issues.apache.org/jira/browse/ATLAS-4752
             Project: Atlas
          Issue Type: Improvement
          Components: atlas-intg
    Affects Versions: 2.3.0, 2.2.0, 2.1.0, 2.0.0, 1.1.0, 1.0.0
            Reporter: Allen Liang


It has been observed that Atlas assigns default values to all primitive 
optional attributes, except for string types, when they are not set in the 
entity POST payload. This behavior seems incorrect for optional attributes. 
While it makes sense for non-optional attributes to have default values, it is 
unclear why optional attributes require default values when not assigned.

As a result, optional attributes of the following types will always be assigned 
their corresponding default values, which may not be expected in most cases:
 * boolean type: false
 * number type (e.g., int, long, float, double, etc.): 0
 * date type: 0


Interestingly, string types do not receive a default value when not set.

The question is whether we can modify this behavior to avoid assigning default 
values for unset optional attributes, or if there is a specific reason for 
requiring default values for unset optional attributes.

Thanks.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to