Currently, the TopicRepository.GetAttributes() method will include attributes under its isDirty check if their IsExtendedAttribute property doesn't match the IsExtendedProperty value of the AttributeDescriptor, even if the AttributeRecord is otherwise clean. This usually happens if the location that an attribute is configured to save has been updated since the attribute was last saved. By detecting these as dirty, we ensure they will get updated with the next Save().
Confusingly, these attributes will also be returned if isDirty is set to false. That doesn't hurt anything in our current logic, but it could lead to potential bugs in the future. If nothing else, it's inconsistent and unintuitive; an attribute should be able to be clean and dirty at the same time. Basically, the difference here is whether we're measure attributes that are either explicitly or implicitly dirty, or just explicitly dirty.
While we're at it, we may want to evaluate how these are returned along with isExtendedAttribute. If an AttributeRecord was not loaded with IsExtendedAttribute, but its AttributeDescriptor is set to IsExtendedAttribute, should it be returned with the isExtendedAttribute parameter? I think it should be. Basically, isExtendedAttribute should follow the AttributeDescriptor, and ignore the AttributeRecord. (It may already do this, but we should confirm.)
Currently, the
TopicRepository.GetAttributes()method will include attributes under itsisDirtycheck if theirIsExtendedAttributeproperty doesn't match theIsExtendedPropertyvalue of theAttributeDescriptor, even if theAttributeRecordis otherwise clean. This usually happens if the location that an attribute is configured to save has been updated since the attribute was last saved. By detecting these as dirty, we ensure they will get updated with the nextSave().Confusingly, these attributes will also be returned if
isDirtyis set tofalse. That doesn't hurt anything in our current logic, but it could lead to potential bugs in the future. If nothing else, it's inconsistent and unintuitive; an attribute should be able to be clean and dirty at the same time. Basically, the difference here is whether we're measure attributes that are either explicitly or implicitly dirty, or just explicitly dirty.While we're at it, we may want to evaluate how these are returned along with
isExtendedAttribute. If anAttributeRecordwas not loaded withIsExtendedAttribute, but itsAttributeDescriptoris set toIsExtendedAttribute, should it be returned with theisExtendedAttributeparameter? I think it should be. Basically,isExtendedAttributeshould follow theAttributeDescriptor, and ignore theAttributeRecord. (It may already do this, but we should confirm.)