openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From janek <>
Subject Re: Subclasses instances and query
Date Tue, 14 Aug 2007 12:19:00 GMT

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.

But OpenJPA does not create it automatically. There is entire chapter about
that in manual.

Solution: @DiscriminatorColumn on root class of hierarchy.


View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message