openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: Subclasses instances and query
Date Fri, 10 Aug 2007 15:50:31 GMT
Hi Jan,

Doesn't sound right.

Please post the full code example so we can narrow down what doesn't  
work, in your configuration. Please include your Java sources (test  
case plus entities), mapping information, and database schema; and  
the version of OpenJPA that you're using.



On Aug 10, 2007, at 8:10 AM, janek wrote:

> Hi,
> I have problem with query and returned result.
> I have three classes:
>   superclass Car,
>   Audi and Hyundai  which extends Car
> After persisting some instances of Audi and H.,
> query "SELECT c FROM Car c" returns the some
> number of Car instances.
> The problem is that result is only of type Car,
> I can not cast it up to Audi or Hyunday.
> I understand that this is more efficient,
> but I need full instances, not just superclass.
> Is there any switch which will turn "full subclass fetch" on?
> Thanks in advance,
> Jan Kotek
> -- 
> View this message in context: 
> instances-and-query-tf4249297.html#a12093140
> Sent from the OpenJPA Users mailing list archive at

Craig Russell
Architect, Sun Java Enterprise System
408 276-5638
P.S. A good JDO? O, Gasp!

View raw message