addupdate. Thus the following is not authorized:
YS3ED48E5Y3070016would not belong to any fleet, which is contrary to the idea of partition. Thus in this situation, archetype generates the following error:
carspartition of a fleet asset which provides the following instructions:
fleetcollection does not contain
f01or if the
carcollection already contains
clearinstruction is equivalent to the
removeallinstruction on a partition because partitions are synchronized.
+=has the same effect as adding the assets with the
addinstruction. Hence it fails if the collection already contains the asset.
-=, it is equivalent to a
removeinstruction. Hence it does not fail if the collection does not contain the id.
aggregateis used to reference some assets. For example, say that a car may be driven by several drivers; the driver asset may refer to several cars through an
. Aggregates are built with the keys of assets to reference.
addinstruction adds a key to an aggregate. It fails if the base collection does not contain that key: in the example below, the instruction fails if
"YS3ED48E5Y3070016"is not found in the car collection. It also fails if
"f01"is not found in the driver collection.
removeinstruction removes a reference from an aggregate. It fails if the key is not in the base collection: in the example below, the instruction fails if
"f01"is not found.
removeallinstruction removes all references in the aggregate, which is empty as a result.
removeifinstruction removes references whose dereferenced asset verifies a predicate.
clearinstruction removes all references in the aggregate and corresponding assets.
addfor aggregate takes an asset key as the argument
clearon aggregate not only removes the assets in the base collection but also clears the aggregate