company logo

PropertyHandle :: DeleteExtension - Remove property extension

The function allows erasing a property extension from an object instance. The function is mainly used for erasing managed property extensions, but might be called also in order to erase automatic property extensions. When the extension to be deleted does not exist in the extension list of the selected instance, the function returns en error ( false ).

In order to check, whether the property extension exists or not, Property ::extensionExist() might be called.

Erasing reference or relationship extensions will erase the referenced collection (and its instances, when the collection is the instance owner) before erasing the extension.

The function throws an exception when being called for a property which is not extendable.

... fragment ( Property &person ) {

  if ( person.tryGet("P1") )

    if ( extensionExist("ext_remarks") )   // check extension property

      person.eraseExtension("ext_remarks");// extension property

}

Return value:  Success ( logical  )

Implementation overview

Implementation details

  1. - internal feature (not documented)
    logical PropertyHandle  :: DeleteExtension (  )
  2. to list
  3. - internal feature (not documented)
    logical PropertyHandle  :: DeleteExtension ( NString &propnames )
    • propnames - Property name

      In contrast to a property path, the property name is just the name of the current property without the hierarchy to the property path. The property name is passed as 0-terminated string

  4. to list