company logo

Property :: eraseExtension - 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 ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false.

Implementation details

bool Property  :: eraseExtension ( odaba::String &sExtension )
  • sExtension - Extension property name

    Extension property are defined in a database or resource database using 40 byte character names (ASCII or Latin1). Extension names are passed as String.