Configuring JPA entity beans
Before you begin
Procedure
- In Package Explorer, right-click the JPA project and select JPA Tools > Configure JPA Entities. The Configure JPA Entities wizard opens.
- In the Available JPA Entities list, select the JPA entity beans that you want to configure or click Create New JPA Entities to create new entities. Click Next.
- For each entity bean, you can configure:
- Primary Key
- For each JPA entity bean, specify the primary key. The primary key uniquely identifies each record in a set of data.
- Relationships
- Add new relationships between JPA entities or delete relationships.
- Named Queries
- Add new queries, edit existing queries, or delete queries associated with a JPA entity. Named queries are used for querying and retrieving data from the database.
- Concurrency Control
- Specify the optimistic lock value for the entity. The optimistic lock value ensures that correct results for concurrent operations are generated.
- Other
- Set advanced options.
- After you configure the entity bean, click Finish.
- Configuring the primary key
- Configuring named queries
- Configuring relationships
- Configuring concurrency control
- Configuring advanced options
Parent topic: Developing Java Persistence API (JPA) applications

