company logo

Property :: eraseCollection - Delete/remove all instance in a collection

The function removes all instances from the collection. Instances are removed/deleted as described in the erase() function. When the function fails, an exception is thrown and the collection remains unchanged.

When the property handle is not valid or when the property is not a collection or singular reference, the function throws an exception.

Notes:

When a selection (filter) has been set for the collection, only instances fulfilling the filter condition will be deleted (filter(), keyFilter()).

Implementation overview

Implementation details

  1. Erase collection
    Property  :: eraseCollection (  )

    The function removes all instanced from the collection and deletes depending instances.

  2. to list
  3. Erase collectin and instances
    Property  :: eraseCollection ( bool bDeleteDependent )

    The function removes all instances from the collection. When passing true in bDeleteDependent, the function also deletes dependent instances. Otherwise instances are deleted only when being owned by the collection.

    • bDeleteDependent - Delete dependent instances

      Usually this option is set to true, i.e. all dependent instances are deleted when being removed from the collection. Passing false dependent instances are not deleted but removed from the collection, only.

      Instances owned by the collection, however, will be deleted always.

  4. to list