You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Necro <Ne...@komdat.de> on 2003/09/20 18:02:37 UTC

Problem with proxies

Hi,

i have some problems with proxies. I got a 1:N relationship
between two classes.

<class-descriptor class="A" table="a">
  <field-descriptor name="id" column="id" jdbc-type="VARCHAR"
primarykey="true" />
  <field-descriptor name="somebigdata" column="somebigdata"
jdbc-type="LONGVARCHAR" />
</class-descriptor>

<class-descriptor class="B" table="b">
  <field-descriptor name="id" column="id" jdbc-type="VARCHAR"
primarykey="true" />
  <field-descriptor name="somedata" column="somedata" jdbc-type="VARCHAR" />
  <field-descriptor name="aid" column="aid" access="anonymous"
jdbc-type="VARCHAR" />
  <reference-descriptor name="a" class-ref="A" proxy="true" >
    <foreignkey field-ref="aid" />
  </reference-descriptor>
</class-descriptor>

I've got some data stored in the database. If I do a select all B object
using
ODMG and OQLQuery I thought that the data from A would not be selected from
the
database, since I used a proxy. The problem is, it is queried from the
database.

This seems to happen in the TransactionImpl class in the methods
assignReferenceFKs
and assertFKAssignment. What I do not understand is, why are these methods
called
at all. I just want to read data from the database. This data should be
correct,
i.e. all foreign keys are correct and set. So why does that happen?

Is it really necessary? How else can I get all B objects using ODMG without
getting the A data, too?

Thanks

christof koenig


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org