Hi all,
How can I map an association with an inheritance hierarchy parent?
Description of the problem:
class A (Long id, B objB) implements Persistent;
class B (Long id, String name);
class C extends B;
class D extends B;
<class name="A" identity="id">
<map-to table="table_a" />
<field name="id" type="long">
<sql name="id_a" type="bigint" />
</field>
<field name="b" type="B">
<sql name="current_b" />
</field>
</class>
<class name="B" identity="id" depends="A">
<map-to table="table_b" />
<field name="id" type="long">
<sql name="id_b" type="bigint" />
</field>
<field name="name" type="String">
<sql name="name" type="varchar" />
</field>
</class>
<class name="C" identity="id" extends="B">
<map-to table="table_c" />
<field name="id" type="long">
<sql name="id_b" type="bigint" />
</field>
</class>
<class name="D" identity="id" extends="B">
<map-to table="table_d" />
<field name="id" type="long">
<sql name="id_b" type="bigint" />
</field>
</class>
When an object of type A is created, Castor creates an object of
type B (i.e., with id=1), that's ok. The class A implements the
jdoLoad method, in this method I try to load the object C with id=1
and assign it to 'objB' attribute.
This actions throws
java.lang.IllegalStateException: Transaction
org.exolab.castor.jdo.engine.TransactionContextImpl@5d3388
does not hold the read lock
What's wrong?
Thanks,
Quique
--
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev