If the table’s primary key maps to a single field in the implementation class (which must be the same type as the component’s primary key), display the All Properties tab and configure the properties in the following table:
Property name |
Value |
---|---|
mapField:[key] (For single-column keys only.) |
The database column name. |
|
The name of the component field that the key maps to. |
To map database fields to columns, display the All Properties tab and define properties to map database columns to fields in the implementation class, using the name/value patterns listed in the table below:
For columns of this type |
Property name |
Value |
---|---|---|
Key fields (enter one property for each key field) |
mapField:field[key] Where field is the name of the field in the implementation class that this key column maps to. |
The database column name. |
Non-key fields (enter one property for each field) |
mapField:field Where field is the name of the field that this key column maps to. |
The database column name. |
You can optionally append a SQL type name to column names, in square brackets. For example, to specify the column type must be varbinary(1024), enter:
icon[varbinary(1024)]
The type name is used during automatic table creation. This feature is useful when a Java type can map to multiple SQL types; in that case, EJB Server defaults to the type with minimal storage requirements when creating the table. Varchar columns default to 100 bytes length, and varbinary columns default to 255 bytes. Specify a type name to override the default.