> Inheritance mapping 2 fails. JPOX doesn't > support it, and the mapping isn't consistent. This needs a few > things: UNION join strategy plus generating a sequence used in > multiple tables. JDO-167 > > Inheritance 3 fails. Optimization of inheritance 1 where there is no > table for abstract classes. JPOX doesn't support it. AI Craig: > discuss this mapping with expert group. It might be an optional feature.
To be specific, JPOX doesn't currently support a 1-N relation with the element using subclass-table. This doesn't mean that work hasn't been done to take the implementation of this so far, but the end result so far is that the support is not complete. One issue I would have is how a join-table relation like this should be represented in the datastore (the join table structure). What I am planning to do is handle it like how we handle collections of interfaces. With this the join table has a FK column for each possible implementation. So in the case of a 1-N relation with an element using subclass-table, and having 2 subclasses then the join table would be OWNER_ID (FK back to owner table) SUBCLASS_1_ID (FK to SUBCLASS_1 table) SUBCLASS_2_ID (FK to SUBCLASS_2 table) ORDER_ID (part of the PK) with the SUBCLASS_1_ID, SUBCLASS_2_ID being populated if the element is of that type. I see nothing in the JDO2 spec to say that this has to be the way that it is represented, so it becomes the choice of the JDO implementation. Do either of inheritance2, inheritance3 test this and what do they assume is the join table structure ? -- Andy
