All of the properties of a repository item are described in the XML repository definition using <property>
tags. In the example above, each property of the repository item is stored in a database column that has the same name as the property. This default behavior can be overridden using the column-names
attribute in the <property>
tag:
<property name="login" column-names="login_name" data-types="string"/>
The column-names
attribute of a property specifies the database column that stores the property. Only id
properties can have more than one column in their column-names
attribute. Each property must also define its data type, using the data-types
attribute. In the case of a multi-column id
property, the data-types attribute is a comma-separated list of data types, each entry of which corresponds to an entry in the column-names
attribute. Each column can have a different data-type. If no data type is specified, the string data type is used by default. The valid data type names and their Java and SQL representations are listed in the Data Type Correspondences section of SQL Repository Definition Tag Reference in the SQL Repository Reference chapter.