Issue Details (XML | Word | Printable)

Key: OPENJPA-143
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Michael Dick
Reporter: Kevin Sutter
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
OpenJPA

Problems with Single Table Inheritance Strategy (and Discriminator Type of Integer)

Created: 13/Feb/07 05:19 PM   Updated: 12/Oct/07 03:59 PM
Return to search
Component/s: jpa
Affects Version/s: None
Fix Version/s: 1.0.0

Time Tracking:
Not Specified

Resolution Date: 16/Aug/07 09:13 PM


 Description  « Hide
Using the @DiscriminatorType of Integer with Single Table Inheritance, I've come across two problems...

o The @DiscriminatorValue seems to be required on abstract classes in the hierarchy. This should not be required. Actually, according to section 9.1.31 of the spec, this annotation should only be required on concrete classes. But, without this annotation, I am getting an exception about not being able to cast a String to an Int.

o This exception that I am receiving with a "missing" @DiscriminatorValue would indicate that the default value being provided by OpenJPA is a String all the time instead of basing the default the value off of the DiscriminatorType of Integer. This is further described in Table 21 of section 9.1.31 of the spec.

As described, I have a workaround by specifying a @DiscriminatorValue on the abstract class, but these seem to be real problems that need to be addressed. Thus, this defect.

Kevin

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.