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.
schema-generator-properties Subelements
|
|
|
|
zero or more |
Specifies a
property name and value. |
|
Properties
The following table describes properties for the schema-generator-properties element.
schema-generator-properties Properties
|
|
|
|
false |
|
bean-name.field-name.attribute |
none |
Defines a column attribute. For attribute descriptions, see Table C-125. |
|
The following table lists the column attributes for properties defined in the schema-generator-properties
element.
schema-generator-properties Column Attributes
|
|
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>