After generating artifacts, you need to link the Customer and Address
business objects in a parent-child relationship. You will provide additional
application-specific information to support the linking of the objects.
- Under Data Types, double-click AddcuserCustomer to
open the business object in business object designer.
- Click the icon for Add an attribute to a business object.
Figure 1. Add an attribute to the business object
This creates a new attribute called attribute1,
whose type is the AddcuserAddress object.
- Rename this new attribute by typing addrObj.
- Change the type of the attribute by clicking on the string type. A list of types that can be associated with this attribute is displayed.
Select the AddcuserAddress type.
Figure 2. Change type of attribute
- Indicate this Address child object is a multiple cardinality type;
that is, one Customer object can have multiple Address objects.
- Select the new attribute addrObj AddcuserAddress.
- In the Properties tab, click Description.
- Select the Array checkbox.
Figure 3. Check Array for multiple cardinality
- Add the attribute application-specific information for the addrObj
AddcuserAddress attribute.
- In the Properties tab, click Application
Info.
- Select the JDBCAttributeTypeMetadata check
box to add attribute application-specific information to the newly added attribute.
Figure 4. Add attribute application-specific information
- Under ASI element properties, right-click jdbcasi:
JDBCAttributeTypeMetadata. Select .
Figure 5. ASI element properties
- Use the default value of true for jdbcasi:Ownership. By setting the ownership value to true, you indicate that the parent
owns the child; that is, the child cannot exist without the parent.
- Click Save to save the Customer business
object.
- Set the foreign key on the AddcuserAddress business object.
- Under Data Types, double-click AddcuserAddress to
open this business object in business object designer.
- Click the custid attribute.
- In the Properties tab, click Application
Info.
- Right-click jdbcasi:JDBCAttributeTypeMetadata.
Select . Type the value pkey.
The
pkey value represents the attribute in the Customer object that refers to
the primary key in the Customer table.
Figure 7. Set
foreign key
Terms of use |
Last updated: Tue 12 Dec 2006 03:32:39
(c) Copyright IBM Corporation 2005, 2006.
This information center is powered by Eclipse technology (http://www.eclipse.org)