Enhance OpenJPA Support of Polymorphic Tables
---------------------------------------------
Key: OPENJPA-1658
URL: https://issues.apache.org/jira/browse/OPENJPA-1658
Project: OpenJPA
Issue Type: Improvement
Components: jpa
Affects Versions: 1.2.2
Environment: WebSphere Application Server on Linux and DB2 on AIX
Reporter: Pat Grady
I'm building an application using polymorphic tables or more specifically a
joined table pattern. The discriminator column is implemented in DB2 9.5 as a
char(10) field and the discriminator value is variable in its length. The
behavior within the application is that I can create and persist the object
with no issues. When attempting to retrieve objects, no objects return.
Tracing the issue shows that JPA is finding the object but not returning it
because the persisted value space-padded to 10 characters (as is expected in a
char field) does not equal the non-space-padded value in the .java files. If I
change the DB column to varchar, everything works as expected; my DBA wants the
char field for performance reasons. Suggest providing a switch of some sort
(e.g., a value in an annotation tag) to treat the discriminator column
comparison as trimmed to support a persisted char value.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.