You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by Andy Jefferson <an...@jpox.org> on 2006/03/31 21:20:12 UTC

PersistentInterface

What is supposed to happen in this situation with "Persistent-Interfaces"

public interface A
{
    ...
}
public interface B
{
    ...
}
public interface C extends A, B
{
    ...
}

with metadata

<interface name="A" table="TABLEA">
    <inheritance strategy="new-table"/>
    ...
</interface>
<interface name="B" table="TABLEB">
    <inheritance strategy="new-table"/>
    ...
</interface>
<interface name="C">
    <inheritance strategy="superclass-table"/>
    ...
</interface>

and the user calls pm.newInstance(C.class) and wants to persist it.

With persistent classes this is never an issue since you can't have multiple
inheritance. 
The user wants to persist instances of implementations of C into the table of the
superclass ... yet there are 2 possible tables. JDOUserException ?

--
Andy