IDs for repository items are requested from the appropriate IdSpace for the repository item. The id-space-names attribute in the primary table of an item descriptor specifies which IdSpaces supply repository IDs for items of that item type. For item types with single-column IDs, the default name for the IdSpace is the item descriptor name. For item types with multi-column IDs, the default name for the IdSpace is derived from the primary table name and ID column:

primary-table-name.id-column-names

For example, in an item descriptor defined like this:

<item-descriptor name="user">
  <table name="users" type="primary" id-column-names="id">
    properties...
  </table>
</item-descriptor>

the default IdSpace is named user. In an item descriptor with a composite repository ID defined like this:

<table name="user" type="primary" id-column-names="dept_id,emp_id">
    properties...
</table>

the default IdSpaces is named user.dept_id and user.emp_id. In any case, you can override the default IdSpace names with the id-space-names attribute in the item descriptor definition:

<table name="user" type="primary" id-column-names="dept_id,emp_id"
       id-space-names="DepartmentId,EmployeeId">
    properties...
</table>

See the Core Dynamo Services chapter in the ATG Platform Programming Guide for more information about ID space names and how they affect the IDs of newly generated items.


Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved. Legal Notices