company logo

CopyLevel - Copy levels

Copy levels allow defining copy algorithms for copying instances. In order to refer to the copy model when copying instances, copy option CopyDependent should be passed to the copy function.

Copy options apply to properties in copied instances, which do not have a copy level (undefined). This allows copying instances depending on the context, in which those are referenced.

Enumarators overview

  • CP_all (6) - Copy all
  • CP_default (4) - Copy referenced instances or attribute data
  • CP_instance (3) - Copy instance data
  • CP_key (0) - Copy links or key attributes
  • CP_local (1) - Copy owning references
  • CP_model (5) - Copy accoring to copy model
  • CP_none (2) - Do not copy referenced instances or attribute

Enumerator details

  1. CP_key - Copy links or key attributes

    The option is used for copying references to related data. It may apply on relationships in order to copy links or for exporting the primary or sort key rather than the complete instance. This allows maintaining links without overwriting existing instances.

    Code: 0
    to list
  2. CP_local - Copy owning references

    The copy option causes copying or exporting instances for a reference or relationship owning the instances.

    Code: 1
    to list
  3. CP_none - Do not copy referenced instances or attribute

    This copy option is used for suppress copy operations. Thus, it can be used in some cases for testing copy functions (e.g. for testing import files). It is also used for suppressing copy of attribute data

    Notes:

    This copy level can be used for renumbering __AUTOIDENT instances by setting copy level for __AUTOIDENT to none.

    Code: 2
    to list
  4. CP_instance - Copy instance data

    The copy option causes copying or exporting instances for a reference or relationship without copying related instances (references and relationships).

    Code: 3
    to list
  5. CP_default - Copy referenced instances or attribute data

    Selecting this option, data is copied according to default copy rules, i.e. instances are copied, when they are owned by the reference or relationship or when a relationship is not secondary. This is the default value, which is set automatically, when defining a new member.

    Code: 4
    to list
  6. CP_model - Copy accoring to copy model

    The copy option causes copying or exporting instance data. References and relationships are copied according to copy rules defined in the data model.

    Code: 5
    to list
  7. CP_all - Copy all

    The value indicates, that instances and relationships are to be copied. Copy does perform a deep copy operation, i.e. owned instances and its relationships are copied as well. References to instances not owned by the copied instance are copied as references only, i.e. instance data for instances not owned by the instance is not copied, but links are created

    Deep copy operations allow copying the complete database content without redundancy and without the risk of infinite recursions. This is also the default setting for the copy level in the copy model when creating new data type properties.

    Code: 6
    to list