db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Spräner_Ext" <CSprae...@provinzial-online.de>
Subject Inheritance with anonymous access
Date Tue, 16 Mar 2004 15:22:11 GMT
Hallo,

Problem:
Having class "A" and a derived class "B" extends "A". The classes "A" ann
"B" are mapped on different tables and the relation is mapped as a "super"
reference from "B" to "A". A query on "A" to an instance of B loads only
the data of A. So i use the ojbConcreteClass field and the data of "B" will
be loaded.

Now i made a query in "B" with the ojbConcreteClass field defined. Than ojb
crashes.
The problem is, that ojb tries to load "B" and finds a reference to "A". So
ojb tries to load "A" and sees the ojbConcreteClass field which tells it to
load an instance of "B". At this moment the fk- Values of the created
instance of class "B" is not defined and i get an error that all fk- Values
are null.

any solutions?

The problem gets more difficult if there is another class "C" which has
references to class "A". Ojb can not load the instances of "B" while
loading an instance of "C". Is it possible to map another field to the real
class name an to write an own RowReaderImplementation which uses this new
field to solve the problem?

btw.: When will there be a final version of 1.0? i think the home page
tells it will be in the next two weeks, but this statement is from about
Christmas! Please make it! OJB is good enough for a 1.0 release. And we are
wating for it!

Thank you all for your work...

carsten





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


Mime
View raw message