cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julia Filho <jfil...@yahoo.com>
Subject Re: Vertical inheritance
Date Wed, 25 Aug 2010 16:10:22 GMT

Hi,

Is vertical inheritance not supported in Cayenne 3.0?  According to the
documentation, vertical inheritance is supported, but I am running into
problems with the generated SELECT query when reading one of the subclasses:

The generated query is:

SELECT t0.DATA_COLLECTION_ID, t0.COLLECTION_TYPE_ID, t0.DATA_COLLECTION_ID,
t0.SCHOOL_YEAR, t0.SNAPSHOT_DATE FROM ESDM.K12_DATA_COLLECTION t0 JOIN
ESDM.DATA_COLLECTION t1 ON (t0.DATA_COLLECTION_ID = t1.DATA_COLLECTION_ID)
JOIN ESDM.DATA_COLLECTION_TYPE t2 ON (t1.COLLECTION_TYPE_ID =
t2.COLLECTION_TYPE_ID) WHERE t2.COLLECTION_TYPE_ID = ? [bind:
1->COLLECTION_TYPE_ID:3]


which is a problem because 
1) column COLLECTION_TYPE_ID is in select list for the subclass
(K12_DATA_COLLECTION) but that column is in the super class table
(DATA_COLLECTION), not the subclass 
2) DATA_COLLECTION_ID is in the K12_DATA_COLLECTION select list twice.

Do you have any suggestions, or is this functionality not yet supported?

thank you for any assistance you can give
Julie


-- 
View this message in context: http://cayenne.195.n3.nabble.com/Vertical-inheritance-tp827636p1334340.html
Sent from the Cayenne - Dev mailing list archive at Nabble.com.

Mime
View raw message