persistence@glassfish.java.net

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

From: Gordon Yorke <gordon.yorke_at_oracle.com>
Date: Fri, 17 Feb 2006 09:13:26 -0500

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