Hi Michael,
Yes, an implementation must return the proper instance (including its
class) at all times. That's why the SELECT statement must include the
discriminator column if it exists. If there is a discriminator column
and it's not included in the SELECT statement, it's a JDOUserException.
Craig
On Nov 10, 2005, at 9:53 AM, Michael Watzek wrote:
Hi Craig,
is it a requirement for an implementation to return the right
runtime type when a SQL query selects instances from a pc
superclass, e.g.
String sql = "SELECT personid, firstname, lastname,
middlename, birthdate, addrid, street, city, state, zipcode,
country, hiredate, weeklyhours, salary, wage, discriminator FROM
persons";
Query query = pm.newQuery("javax.jdo.query.SQL", sql);
query.setClass(Person.class);
query.execute()
Is the query supposed to return fulltime employees and parttime
employees?
Regards,
Michael
--
-------------------------------------------------------------------
Michael Watzek [EMAIL PROTECTED] Engineering GmbH
mailto:[EMAIL PROTECTED] Buelowstr. 66
Tel.: ++49/30/235 520 36 10783 Berlin - Germany
Fax.: ++49/30/217 520 12 http://www.spree.de/
-------------------------------------------------------------------
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!