Hi all,
did anyone know, how to query a dependend class (Person depends on Firma)
with an oql-query? Perhaps it isn�t possible, to query direct an dependend
class?
The following query at the firma works fine:
OQLQuery oql;
oql = myDB.db.getOQLQuery("select f from myApp.firma f");
QueryResults rs = oql.execute();
while (rs.hasMore()) {
f = (Firma)rs.next();
System.out.println("Firma: " + f);
}
But this example doesn�t:
oql = myDB.db.getOQLQuery("select p from myApp.Person p");
It throws the exception:
org.exolab.castor.jdo.QueryException: Could not find mapping for class
myApp.Person
Here is a part of the Mapping:
<class name="myApp.Firma" identity="firmaID" access="shared"
key-generator="seq_firma">
<description> Firma </description>
<map-to table="firma" />
<field name="firmaID" type="integer" required="true">
<sql name="firmaID" type="integer" />
</field>
</class>
<!-- PERSON -->
<class name="myApp.Person" depends="myApp.Firma" identity="personID"
access="shared" key-generator="seq_person">
<description> Person </description>
<map-to table="person" />
<field name="personID" type="integer" required="true">
<sql name="personID" type="integer"/>
</field>
<field name="nachname" type="string">
<sql name="nachname" type="varchar" />
</field>
<field name="firma" type="myApp.Firma" required="true">
<sql name="firmaID" required="true" />
</field>
</class>
Thanks, Heiko
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev