Schema Element States
 
 
 

All elements within the model maintain a state flag. This flag can be retrieved by calling FdoSchemaElement::GetElementState(), but it cannot be directly set. Instead, its state changes in reaction to the changes made to the model:

Additionally, when an element that is contained by another element is changed in any way, the containing element is also marked as Modified. So, for example, if a new value is added to the SchemaAttributeDictionary of the “Class3” element in our model, both the “Class3” FdoClass object and the FdoFeatureSchema object would be marked as Modified.

The state flags are maintained until the changes are accepted, that is, when IApplySchema is executed. At that time, all elements marked Deleted are released and all other elements are set to Unchanged.

NoteWhen you remove an element from an owning collection, its state is marked as Detached. All collections currently in FDO are owning collections, except for one, the collections FdoClassDefinition::GetIdentityProperties().