Hi,

I have got another problem. Let's say i have a
class A and a subclass B and both implement
interface C.

<class-descriptor class="C">
  <extent-class class-ref="B" />
</class-descriptor>

<class-descriptor class="A">
  <extent-class class-ref="B" />
</class-descriptor>

<class-descriptor class="A" table="a">
  <field-descriptor name="id" column="id" ... />
  <field-descriptor name="name" column="name" .. />
</class-descriptor>

<class-descriptor class="B" table="b">
  <field-descriptor name="id" column="id" ... />
  <field-descriptor name="somevalue" column="..." ... />
  <reference-descriptor name="super" class-ref="A">
    <foreignkey field-ref="id" />
  </reference-descriptor>
</class-descriptor>

All I want to do is: select all objects which implement C with
a specified name of 'blabla'. I'm using ODMG and tried something
like this:

OQLQuery query = odmg.newOQLQuery();
String anfrage = "select x from C where name = 'blabla'";
query.create(anfrage);
query.exeute();

ojb now creates the following SQL statement:

select a0.id from b a0 where name = ?

Of course this will fail, because there is no such column in table b,
but i thought that ojb will automatically join it with table a, since
i told ojb in my repository.xml file that B is a subclass of A like
it is mentioned in the tutorial.

Did i unterstand something completely wrong here? How can I make it work?

thanks in advance

christof

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

Reply via email to