If a key value in a business object is blank or has a null value in the database, then build the where clause with the " is null" type instead of the "=" operator type.
IBM recommends that business objects have at least one key attribute that does not have a blank value.
The following scenario is a parent object with one key that has a null value. This scenario fails under these conditions.
Attribute | Type |
---|---|
cid | Integer (Key) |
name | String |
comments | String |
The following scenario is a parent object with two keys and one key has a
null value. This scenario passes under these conditions.
Attribute | Type |
---|---|
cid | Integer (Key) |
name | String |
comments | String |
In scenario two, build the retrieve query by selecting cid, name, and comments from customer, where cid=1000 and name is set to null.
The following scenario is a parent object with one child object in a container object with a foreign key reference. This scenario fails under these conditions.
Attribute | Type |
---|---|
cid | Integer (Key) |
name | String (Key) |
comments | String |
Address | Address |
Aid | Integer (Key) ASI:FK=cid |
Acity | String |
Azip | String |
If cid contains a null value, then build the retrieve query by selecting Aid, Acity, and Azip from address. Set the value of Aid to null.
The following scenario is a parent object with one child object in a container object with two key references. This scenario passes under these conditions.
Attribute | Type |
---|---|
cid | Integer (Key) |
name | String |
comments | String |
Address | Address |
Aid | Integer (Key) ASI:FK=cid |
Acity | String (Key) ASI:FK=name |
Azip | String |
If name has a null value, then build the Retrieve query by selecting Aid, Acity, and Azip from address, where Aid=Cid and Acity has a null value.