Janek,
Your problem description sounds very similar to JIRA Issue OPENJPA-143 (
https://issues.apache.org/jira/browse/OPENJPA-143).  At least the first
bullet in the Issue concerning the "requirement" to put the
@DiscriminatorValue on abstract classes.  We are still hoping to get this
resolved in our 1.0.0 release...

Thanks,
Kevin

On 8/14/07, janek <[EMAIL PROTECTED]> wrote:
>
>
> I know where the problem is.
>
> I am using InheritanceType.SINGLE_TABLE and it seems that OpenJPA does not
> store any class identificatior in table. Information about class is
> reconstructed from NULL and NON NULL fields. So if subclass declares some
> fields which are null, OpenJPA does not have any informations which can
> lead
> to original class and simply use class declareted in Query.
>
> Collumn for this info should be created automaticly as is specified in
> JPA.
>
> http://java.sun.com/javaee/5/docs/api/javax/persistence/DiscriminatorColumn.html
>
> But OpenJPA does not create it automatically. There is entire chapter
> about
> that in manual.
>
> Solution: @DiscriminatorColumn on root class of hierarchy.
>
> Regards,
> Jan
>
> --
> View this message in context:
> http://www.nabble.com/Subclasses-instances-and-query-tf4249297.html#a12143287
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
>

Reply via email to