Hello *,
Please excuse me if this has been asked before, but google and the list
archives could not help me.
I have two classes A and B, mapped onto a database.
When A and B are independent, I can execute the queries
SELECT o FROM A o;
and
SELECT o FROM B o;
without problems.
When B is dependent on A, the first query executes fine. The second
query yields an Exception:
org.exolab.castor.jdo.QueryException: Could not find mapping for class B
Is this an intended behaviour? How can I query dependent objects of type
B? What am I missing?
Any pointers to the solution are very appreciated.
Thank you in advance,
Thomas Hirsch
======================================================================
Mapping file extract:
<mapping>
<class name="IMSSubscription"
access="shared" key-generator="MAX" identity="id">
<map-to table="IMSSUBSCRIPTION" xml="IMSSubscription"/>
<field required="true" transient="false" direct="false"
name="privateID" type="string" lazy="false">
<sql name="PRIVATEID" dirty="check" type="char"
read-only="false"/>
<bind-xml node="element" name="private-iD"/>
</field>
<field name="serviceProfile"
type="ServiceProfile"
collection="array">
<sql many-key="id"/>
<bind-xml node="element" name="serviceProfile"/>
</field>
<field required="true" transient="false" direct="false"
name="id" type="integer" lazy="false">
<sql name="ID" dirty="check" type="integer"
read-only="false"/>
<bind-xml node="attribute" name="id"/>
</field>
</class>
<class name="ServiceProfile"
depends="IMSSubscription"
access="shared" key-generator="MAX" identity="id">
<map-to table="SERVICEPROFILE" xml="service-profile"/>
<field required="true" transient="false" direct="false"
name="id" type="integer" lazy="false">
<sql name="ID" dirty="check" type="integer"
read-only="false"/>
<bind-xml node="attribute" name="id"/>
</field>
<field required="true" transient="false" direct="false"
name="IMSSubscription"
type="IMSSubscription" lazy="false">
<sql name="kIMSSubscription" dirty="check"
read-only="false"/>
<bind-xml node="element" name="IMSSubscription"/>
</field>
(...)
</class>
(...)
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user