Deprecated feature: Example: Loading data into the MEMBER table (idresgen utility)
- Determining if a primary table (that is, a table listed in KEYS
or SUBKEYS) exists in the database.
This resolution is based on the contents of the XML data for that element using either unique-index resolution or properties-file specification.
- Determining if there is a foreign key to a primary table.
This is done with a resolution specification in the foreign-key attribute of the related table.
The MEMBER table is used as a "super class" for the ORGENTITY, MBRGRP, and USER tables. This creates an "is-a" pattern that is useful for maintaining referential integrity when tables have foreign-key constraints to the subtypes of the MEMBER table. Because all MEMBER subtypes share a common base type, however, the identifier must be unique among the subtypes. This means that an ORGENTITY_ID must be unique in the MBRGRP_ID and USER_ID set. To accomplish this, the KEYS table refers to only the ORGENTITY, MBRGRP, and USER tables and specifies mutually exclusive ranges for their identifiers. Each of the subtypes has a primary key; each of these primary keys is also a foreign key to the MEMBER table primary key.
The constraints between MEMBER and its subtypes create a situation where a MEMBER and subtype cannot have a synchronized ID. In order to load the ORGENTITY, MBRGRP, and USERS tables into the system using the loading utilities, the idresgen utility recognizes the "is-a" pattern and deals with it appropriately. The following XML syntax for the idresgen utility:
<ORGENTITY
ORGENTITY_ID="@orgAlias"
DN="o=buyer organization a,o=root organization"
ORGENTITYNAME="Test Org"
ORGENTITYTYPE="O">
<ISA>
<MEMBER
TYPE="O"
STATE="1"
/>
</ISA>
</ORGENTITY>
generates the following:
<MEMBER
MEMBER_ID="12345"
TYPE="O"
STATE="1"
/>
<ORGENTITY
ORGENTITY_ID="12345"
Synchronized with member element
DN="o=buyer organization a,o=root organization"
ORGENTITYNAME="Test Org"
ORGENTITYTYPE="O"
/>
In this way, the idresgen utility handles the <isa> subelement and creates a synchronized identifier.
The following sample XML snippet shows how to use the value of the resolved member_id in foreign tables like MBRREL or MBRROLE:
<users
users_id="@member_id_0000000114"
registertype="R"
field1="0000000114"
field2="201"
dn="RegisteredUser114"
registration="2005-06-23-04.13.41.000000"
registrationupdate="2005-06-23-04.13.41.000000"
profiletype="C"
language_id="100"
setccurr="GBP">
<isa>
<member type="U" state="1"
member_id="@member_id_0000000114"/>
</isa>
</users>
<mbrrel descendant_id="@member_id_0000000114"
ancestor_id="-2001" sequence="2"/>
<mbrrole member_id="@member_id_0000000114" role_id="-29"
orgentity_id="10001"/>