> <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects > Metadata 2.0//EN" "http://java.sun.com/dtd/jdo_2_0.dtd"> > <jdo> > <package name="org.apache.jdo.tck.pc.fieldtypes"> > <class name="SimpleClass" identity-type="application" � � > objectid-class="org.apache.jdo.tck.pc.fieldtypes.SimpleClass$Oid"> > � �<implements name="SimpleInterface"> > <field name="id" primary-key="true"/> > </class> > </package> > </jdo>
> So is it sufficient that the SimpleInterface metadata be ahead of the > SimpleClass metadata in the .jdo file? What "SimpleInterface" MetaData ? It's an interface, and since JPOX doesn't support specification of <interface> as such yet then it doesn't have any MetaData. I assume you mean the MetaData for the class that has a field of type SimpleInterface ? If that is in the same file as the MetaData for SimpleClass then all should be ok. If they are in different files then you need to let JPOX know about the implementation classes somehow (it can't just go off scanning around the CLASSPATH). There are many ways ... the simplest and one that is implementation-independent would be to call pm.getExtent(SimpleClass) which will load the MetaData for SimpleClass. -- Andy Java Persistent Objects JDO - JPOX
