db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <a...@jpox.org>
Subject PersistentInterface
Date Fri, 31 Mar 2006 19:20:12 GMT
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

Mime
View raw message