company logo

Copy model

Keywords:  copy model

Copying data is often rather difficult. Deep copy usually leads to infinitive recursion or tends to copy large parts of the database. Copying instances only is often to weak. ODABA provides some enhanced copy methods in addition, e.g. copying primary relationships, only.

Thus, there are several ways of controlling copy operations from a application. Nevertheless, this is usually not sufficient, since copying linked objects is usually a conceptual decision. Many copy problems can be solved by defining a copy model. A copy model can be defined by setting copy dependencies for each property.

Calling copy functions with the CopyDependent option will copy related instances according to the defined copy model.

Since copy dependencies are part of property definition in the data model, ODABA supports only one copy model. Practice, however, has shown, that the one copy model will probably solve 99% of your copy problems.

Related topics