Model relationships and record changes
HDL files can represent complete business-object hierarchies as well as targeted changes to individual components. Correctly identify parent and related records so that HDL can assemble the supplied data into the intended logical objects and process changes without conflicting instructions.
Identify the parent of every child record
Child components are processed as part of their parent business-object hierarchy. Each child must therefore provide enough information to identify both the child record and the parent record to which it belongs.
A child component must:
- Identify itself uniquely and
- Identify its parent uniquely
For example, if JobGrade is a child of Job, the JobGrade line must identify which Job owns the valid-grade record.
You can use whichever parent-reference key type the component supports.
View Business Objects identifies:
- the Parent Surrogate ID attribute;
- supported integration keys;
- supported user-key combinations.
The referenced object must exist
An integration-key reference isn't usable until the referenced object has been created successfully.
If multiple related .dat files are supplied in the same ZIP, HDL loads business objects in dependency order. A reference will still fail if the referenced record itself failed to load.
Add or update child records without resupplying the whole object
You don't have to resupply an entire hierarchy to change one part of it.
For example, you can include the top-level component to identify the logical object and then supply only the child records that need to be created or changed.
This partial-object model is one of HDL's key strengths.
Avoid competing instructions for the same logical record
HDL groups related lines into logical objects; it doesn't simply process the file top-to-bottom as independent commands.
Don't rely on line order to resolve conflicting instructions.
In particular:
- don't use both MERGE and DELETE for the same logical record in one file;
- for a non-date-effective record, don't try to create and then separately update that same component in the same file as two processing stages.
You can, however, MERGE one component of a logical object while DELETEing another component where that combination is valid.