In order to obtain the data of a repository item from a datastore, you must supply the primary table’s ID. The repository item descriptor can map to the table’s ID column implicitly through the <table> tag attribute id-column-names; or it can explicitly map to the ID column through a <property> tag that is set as follows:

<property name="id" column-name="table-id-column"/>

For example:

<item-descriptor name="user">
  <table name="user" type="primary" id-column-names="emp_id">
     <property name="id" column-name="emp_id"/>
  </table>
</item-descriptor>

If the item descriptor does not explicitly define an id property, its data type cannot be explicitly set; and it uses the default string data type. In this case, the following constraints apply:

However, if you explicitly define the id property in the item descriptor with a <property> tag, you can query repository items by their ID and you can explicitly set the id property’s data type. The columns specified by the id-column-names attribute are not required to use the same data type; a composite repository ID can be composed of strings, integers, and longs.

Note: You cannot change a repository item’s ID after it is saved to the database.

Constraints

Avoid using the following special characters in repository IDs:

Characters used in:

Examples

URLs

+ (plus)
/
(forward slash)
?
(question mark)
%
(percent sign)
#
(hash)
&
(ampersand)

XML

< (left angle bracket)
>
(right angle bracket)
"
(double quote)
'
(single quote)
&
(ampersand)


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