Property :: canInsert - Can instance(s) be inserted into collection
The function checks, whether instances can be inserted or appended into a collection or not. The function returns true , when creating a new instance and adding an existing instance within the collection is possible. Otherwise, the function returns false .
The function may be called in order to check whether an existing instance can be inserted to collection ( insertReference() ) or not.
Returning true always implies canUpdateCollection() , but not necessarily reverse. There are several reasons rejecting insertion:
- The property handle is opened for read, only
- Instance cannot be inserted into base extent (superset. canInsert ())
- Inverse reference exists but cannot be updated (inverse. canUpdateCollection ())
- Maximum number of instances in the collection exceeded
- The current application does not have rights for inserting the instance (disabled by context)
- The property handle is invalid.
- Updating is denied by context handler (client or server) TypeContext ::canInsert()
Return value: Success ( bool )
The value is true when the function was executed successfully. Otherwise the value is set to false .