Troubleshooting
Problem
JPA Tools do not recognize the DB2 Table Aliases as valid table references for entity beans.
Symptom
DB2 Table Aliases are not listed in the Tables section, in the Generate Custom Entities wizard.
Using table annotations such as @Table(name="my_alias") to specify valid DB2 Table Aliases can result in validation errors.
Cause
JPA Tools does not support DB2 Table Aliases.
Refer to the 'Generation of JPA entities from DB2 alias' enhancement in the related URL section
Diagnosing The Problem
NOTE: You require a connection to a DB2 instance containing at least one table alias.
1) Start Rational Application Developer
2) Open (or create a new) JPA project, with the database connection set to the DB2 instance.
3) Right click on the JPA project > JPA Tools > JPA Entities from Tables...
4) Click Next
5) Ensure the connection is set to to the DB2 instance and select the schema containing the table alias.
The alias is not displayed in the Tables section.
Resolving The Problem
There are two alternatives to work around the problem with the reference(s) that are not resolved:
- Use the table name(s) instead of the table alias(es).
- Turn off JPA validation:
2. Go to the Validation page
3. Deselect the Build checkbox for JPA Validator:
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21634270