db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Watzek <mwa.t...@spree.de>
Subject SQL queries and inheritance
Date Thu, 10 Nov 2005 17:53:38 GMT
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                  Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de        Buelowstr. 66
Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
Fax.:  ++49/30/217 520 12       http://www.spree.de/
-------------------------------------------------------------------

Mime
View raw message