Containment relationships between persistent entities can
be implemented in two different ways.
- A parent business object contains a collection of child objects
in a one-to-many relationship, which requires the following:
- The child object has a reference to the parent object.
- The parent has a containment to the child object, derived from
the reference of the child object.
- The child object has a Get Record transaction, which takes the
child object reference as its Query parameter. The Get Record transactions
enable each parent object to query its collection of associated child
objects.
- A parent business object contains only one child object (a one-to-one
relationship), which requires the following:
- The parent object has a reference to the child object.
- The parent object has a containment to the child object, derived
from reference of the child object.
The containment wizard automatically creates required references
and transactions for you, where possible.
If you define a one-to-many relationship from your data addition
to an out-of-the-box entity, then because the out-of-the-box entity
cannot be modified, the containment relationship will be defined in
the model but not all required code can be generated. You can customize
the generated code to complete the implementation as required.