db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: PersistentInterface
Date Fri, 31 Mar 2006 19:53:16 GMT
Hi Andy,

Good question; good suggestion. If the inheritance strategy is  
impossible (your example) I'd expect a JDOUserException whenever the  
offending strategy is encountered. So it might be during enhancement  
or runtime.

Whatever we decide,

1. It's not a TCK issue because we don't have this pattern in the TCK.
2. We (I) will need to add this to the next maintenance release.

Craig

On Mar 31, 2006, at 11:20 AM, Andy Jefferson wrote:

> 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
>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message