[ 
https://issues.apache.org/jira/browse/ATLAS-2939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Graham Wallis updated ATLAS-2939:
---------------------------------
    Description: 
Use Case:

Pre-condition: There exists an entity instance that has some combination of 
mandatory attributes and non-mandatory attributes. All of the mandatory 
attributes have values (otherwise the entity could not have been created) and 
(for this example) at least some of the non-mandatory attributes have values.

A caller (an application for example) tries to update the entity's attributes, 
providing a new set of attribute values. The revised set of values contains 
values for all the mandatory attributes (otherwise the update will be rejected) 
and contains values for a subset of the non-mandatory attributes, such that a 
non-mandatory that was set (in the pre-condition above) should be not set as a 
result of the update. In other words, at least one of the non-mandatory 
attributes should be cleared.

Post-condition: I think the expected outcome is that the entity has attribute 
values for all mandatory attributes and has attribute values for the 
non-mandatory attributes that were were set by the update or that were already 
set (in the pre-condition) and were not cleared by the update. It should not 
have values for non-mandatory attributes that were either not already set or 
that were set and were cleared by the update.

I think what currently happens is that attribute values are not actually 
cleared as described above - i.e. they remain in the graph and will continue to 
be seen on a subsequent retrieval of the entity.

> Enable EntityGraphMapper to unset optional attribute
> ----------------------------------------------------
>
>                 Key: ATLAS-2939
>                 URL: https://issues.apache.org/jira/browse/ATLAS-2939
>             Project: Atlas
>          Issue Type: Improvement
>            Reporter: Graham Wallis
>            Priority: Major
>
> Use Case:
> Pre-condition: There exists an entity instance that has some combination of 
> mandatory attributes and non-mandatory attributes. All of the mandatory 
> attributes have values (otherwise the entity could not have been created) and 
> (for this example) at least some of the non-mandatory attributes have values.
> A caller (an application for example) tries to update the entity's 
> attributes, providing a new set of attribute values. The revised set of 
> values contains values for all the mandatory attributes (otherwise the update 
> will be rejected) and contains values for a subset of the non-mandatory 
> attributes, such that a non-mandatory that was set (in the pre-condition 
> above) should be not set as a result of the update. In other words, at least 
> one of the non-mandatory attributes should be cleared.
> Post-condition: I think the expected outcome is that the entity has attribute 
> values for all mandatory attributes and has attribute values for the 
> non-mandatory attributes that were were set by the update or that were 
> already set (in the pre-condition) and were not cleared by the update. It 
> should not have values for non-mandatory attributes that were either not 
> already set or that were set and were cleared by the update.
> I think what currently happens is that attribute values are not actually 
> cleared as described above - i.e. they remain in the graph and will continue 
> to be seen on a subsequent retrieval of the entity.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to