You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Kevin Sutter (JIRA)" <ji...@apache.org> on 2007/02/13 18:19:32 UTC

[jira] Created: (OPENJPA-143) Problems with Single Table Inheritance Strategy (and Discriminator Type of Integer)

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

                 Key: OPENJPA-143
                 URL: https://issues.apache.org/jira/browse/OPENJPA-143
             Project: OpenJPA
          Issue Type: Bug
          Components: jpa
            Reporter: Kevin Sutter


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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-143) Problems with Single Table Inheritance Strategy (and Discriminator Type of Integer)

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Linskey updated OPENJPA-143:
------------------------------------

    Fix Version/s: 0.9.7

> Problems with Single Table Inheritance Strategy (and Discriminator Type of Integer)
> -----------------------------------------------------------------------------------
>
>                 Key: OPENJPA-143
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-143
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>            Reporter: Kevin Sutter
>             Fix For: 0.9.7
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.