You can add fields to container-managed persistence (CMP)
entity beans and define them as key fields.
To add a field to a CMP entity bean:
- In the diagram editor, right-click a CMP entity
bean; then click .
- In the CMP Fields wizard, click Add.
- In the CMP Attributes window, specify
a name and a type for the CMP field, specify its array dimension
or define it as a key field, and click Apply.
- Click Finish.
Tip: You can also use the action bars in
the diagram editor or the EJB Deployment Descriptor to
add fields to CMP entity beans.