persistence@glassfish.java.net

Re: Code fix for Issue 267 : DiscriminatorValue is not defined

From: Pramod Gopinath <Pramod.Gopinath_at_Sun.COM>
Date: Fri, 17 Feb 2006 08:07:26 -0800

Hi Gordon
   No, I have not added teststo replicate this problem. Will add these
tests before I check in the code changes.

Thanks
Pramod

Gordon Yorke wrote:

>Hey Pramod,
> This looks good, Have you already added tests to entity-persistence-tests to replicate this problem, both in a root class and in a subclass without an inheritance annotation?
>--Gordon
>
>-----Original Message-----
>From: Pramod Gopinath [mailto:Pramod.Gopinath_at_Sun.COM]
>Sent: Thursday, February 16, 2006 6:16 PM
>To: Tom Ware
>Cc: persistence_at_glassfish.dev.java.net
>Subject: Code fix for Issue 267 : DiscriminatorValue is not defined
>
>
>Hi Tom
> I am attaching code changes relevant to Issue 267.
>This is a case where the user has defined Inheritance strategy of
>"JOINED" (or "SINGLE_TABLE") and not defined a DiscriminatorColumn or
>DiscriminatorValue annotations.
>In this case in the current code there is a bug where we would get a
>NullPointerException for the DiscriminatorValue part.
>
>I have attached the changed source and the cvs diff file.
>
>Thanks
>Pramod
>
>
>
>