Referential Integrity Methods
When using the Business Object Repository, referential integrity tables were automatically generated when converting to runtime. This is not the case anymore from the LN Studio. This section describes how to set up referential integrity methods.
Note: According to the DeleteRef specifications in the BDE
standard, all references for a specific referenceID can be deleted by using no
or an empty data area. This functionality is currently unsupported in
LN.
Instead, delete all references by explicitly specifying the business object
instances (or component instances) for which a reference was defined. In other
words, the data area used for the CreateRef must also be used for the
corresponding DeleteRef.
Let’s for example assume a BII exists for LN. Two components are defined, called ‘Order’ and ‘OrderLine’.
The mapping to tables and columns is as follows:
Component | Attribute / Attribute Implementation | Table | Column |
---|---|---|---|
Order | orderNumber | ppmmm001 | orno |
OrderLine | orderNumber (not a public attribute) | ppmmm002 | orno |
OrderLine | lineNumber | ppmmm002 | lino |
In the following section we will show how to implement the CreateRef and DeleteRef methods for both the Order and the OrderLine.