openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From janek <openco...@gmail.com>
Subject Subclasses instances and query
Date Fri, 10 Aug 2007 15:10:56 GMT

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: http://www.nabble.com/Subclasses-instances-and-query-tf4249297.html#a12093140
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message