Clarifying myself:

I want to have just one table in SQL called child. And software eather uses Child or SuperChild (same table name in both).

I tried moving (repository.xml) extent-class to superclass, but didn't help.

- Joose

12.8.2004 kello 14:50, Joose Vettenranta kirjoitti:

Hi,

I'm having problems on using extent-class and extending java-classes..

I have like this:

class SuperChild extends Child {
 private int age;
 // getters and setters
}

class Child {
 private int id;
 private Parent parent;
 private String name;

 ....
}

and in jdo-file I have:
<class name="SuperChild" identity-type="datastore" persistence-capable-superclass="net.vettenranta.Child">
<field name="age" persistence-modifier="persistent">
<extension vendor-name="ojb" key="column" value="age" />
</field>
</class>


and it goes OK enhancing.

repository.xml:
<class-descriptor class="net.vettenranta.SuperChild" table="child">
<extent-class class-ref="net.vettenranta.Child" />
<field-descriptor name="age" nullable="false" default-fetch="true" column="age" jdbc-type="INTEGER" />
</class-descriptor>


and result is:

org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException: Can not init Identity for given object [EMAIL PROTECTED]

What could be wrong?

Thanks, Joose

--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * [EMAIL PROTECTED] * +358 44 561 0270 *


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * [EMAIL PROTECTED] * +358 44 561 0270 *


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to