# Basic conditions of the metadata update operations

Even though initially any metadata is susceptible to be modified, there are conditions or restrictions that have to be met and which may cause a metadata update job to end up with error if not complied with.

{% hint style="info" %}
**Note**: we can apply as many metadata operations as desired over the object descriptors, although we need to keep in mind that whenever we want to apply multiple operations over the same descriptor, the order in which they are written in the file is important. A different order in the operations on the same descriptor may result in different outcomes.
{% endhint %}

* Metadata update operations on descriptors belonging to collision groups (uniqueness as much as versioning) are not permitted.
* If a metadata schema has a descriptor marked as mandatory, it will have to retain a value after the  update.
* Operations carried out on existing descriptors must be identified by their _Import / Export Code (IE Code)_, if the descriptor has one single value. If the descriptor happens to have multiple values, its metadata value identifier must be indicated too (to obtain this information, please review the _object detail_ section).

The XML structure representing an operation is as follows:

```
<operation>
    <type></type>
    <iecode><![CDATA[]]></iecode>
    <idValueMetadata></idValueMetadata>
    <value><![CDATA[]]></value>
</operation>
```

Not every field is mandatory for every operation. In some cases, if we include certain unnecessary fields, the job will end in error due to syntax mistakes in the operation (e.g., if the delete operation includes the _value_ field, it will be an invalid operation).

The fields that comprise the _operation_ element are:

* **Type**: this field will show the type of operation to carry out (available operations are indicated in the next section).
* **Iecode**: it refers to the descriptor’s Import / Export Code, needed to identify which metadata to update.
* **IdValueMetadata**: this field may be used whenever we need to use the _iecode_ field to reference directly the value of the descriptor affected by the operation. In operations about multi-value descriptors, it is mandatory to indicate it. We will have to access the object detail in order to know which is the _idValueMetadata_ we need.
* **Value**: it is the value to be applied (for add or modify operations).
