Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Developer's Guide

- Previous: schema
- Next: secondary-table

## schema-generator-properties

Specifies field-specific column attributes in `property` subelements.

### Superelements

cmp-resource (`sun-ejb-jar.xml`)

### Subelements

The following table describes subelements for the `schema-generator-properties` element.

Table A–93 `schema-generator-properties` Subelements

Element | Required | Description
--- | --- | ---
property (with subelements) | zero or more | Specifies a property name and value.

### Properties

The following table describes properties for the `schema-generator-properties` element.

Table A–94 `schema-generator-properties` Properties

Property | Default | Description
--- | --- | ---
`use-unique-table-names` | `false` | Specifies that generated table names are unique within each application server domain. This property can be overridden during deployment. See Table 7–4.
    bean-name.field-name.attribute
| none | Defines a column attribute. For attribute descriptions, see Table A–95.

The following table lists the column attributes for properties defined in the `schema-generator-properties` element.

Table A–95 `schema-generator-properties` Column Attributes

Attribute | Description
--- | ---
`jdbc-type` | Specifies the JDBC type of the column created for the CMP field. The actual SQL type generated is based on this JDBC type but is database vendor specific.
`jdbc-maximum-length` | Specifies the maximum number of characters stored in the column corresponding to the CMP field. Applies only when the actual SQL that is generated for the column requires a length. For example, a `jdbc-maximum-length` of `32` on a CMP `String` field such as `firstName` normally results in a column definition such as VARCHAR(32). But if the `jdbc-type` is `CLOB` and you are deploying on Oracle, the resulting column definition is CLOB. No length is given, because in an Oracle database, a CLOB has no length.
`jdbc-precision` | Specifies the maximum number of digits stored in a column which represents a numeric type.
`jdbc-scale` | Specifies the number of digits stored to the right of the decimal point in a column that represents a floating point number.
`jdbc-nullable` | Specifies whether the column generated for the CMP field allows null values.

### Example

    <schema-generator-properties>
       <property>
    	     <name>Employee.firstName.jdbc-type</name>
    	     <value>char</value>
       </property>
       <property>
    	     <name>Employee.firstName.jdbc-maximum-length</name>
    	     <value>25</value>
       </property>
       <property>
    	     <name>use-unique-table-names</name>
    	     <value>true</value>
       </property>
    </schema-generator-properties>

- Previous: schema
- Next: secondary-table

- © 2010, Oracle Corporation and/or its affiliates