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.

THanks,

Craig

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


Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to