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 Mariusz Wójcik <wo...@okno.pw.edu.pl> on 2004/06/15 11:35:38 UTC

Three level inheritance problem - Null data from the mostly nested table

Hi
I try to realize three level of inheritance in OJB. My Class C extends 
Class B extends Class A each data are stored
in separate tables (Table A, Table B, Table C) . I've implemented it.
Inserts work fine. Inheritance is OK, all data are stored in tables.All 
references are OK.

I have problems with quering objects.
I try to get all C Class object. In each object I can't get access to data 
which are stored in A Table (they are null).
But when I try to list A Class Objects, their data are complete.

I noticed very strange thing.

When I try to list object in this order, both methods works fine 
(Collection returned by method getCClassObject is OK, all object,s data 
are complete):
.......

Collection AClassObjects=getAClassObjects(); //getting A Class objects
Collection CClassObjects=getCClassObjects(); //getting C Class objects

.......

But my problems start when I try to invoke only one method:

......

Collection CClassObjects=getCClassObjects(); //getting C Class object

......

Object of CClassObjects collection haven't data stored in A table (the 
mostly nested)...

I have to use the other solution... but it doesn't work.... Please help me 
...

Best regards
mario


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


Re: Three level inheritance problem - Null data from the mostly nested table

Posted by Mariusz Wojcik <wo...@okno.pw.edu.pl>.
Thanks Armin, now everything is ok. You saved my life :))))


Dnia Tue, 15 Jun 2004 18:14:51 +0200, Armin Waibel <ar...@apache.org> 
napisał:

> Hi Mariusz,
>
> did you try latest release (rc7)? Jakob fix a problem with inheritance 
> between rc6 and rc7.
>
> regards,
> Armin
>
> Mariusz Wójcik wrote:
>
>>
>> Hi
>> I try to realize three level of inheritance in OJB. My Class C extends 
>> Class B extends Class A each data are stored
>> in separate tables (Table A, Table B, Table C) . I've implemented it.
>> Inserts work fine. Inheritance is OK, all data are stored in tables.All 
>> references are OK.
>>
>> I have problems with quering objects.
>> I try to get all C Class object. In each object I can't get access to 
>> data which are stored in A Table (they are null).
>> But when I try to list A Class Objects, their data are complete.
>>
>> I noticed very strange thing.
>>
>> When I try to list object in this order, both methods works fine 
>> (Collection returned by method getCClassObject is OK, all object,s data 
>> are complete):
>> .......
>>
>> Collection AClassObjects=getAClassObjects(); //getting A Class objects
>> Collection CClassObjects=getCClassObjects(); //getting C Class objects
>>
>> .......
>>
>> But my problems start when I try to invoke only one method:
>>
>> ......
>>
>> Collection CClassObjects=getCClassObjects(); //getting C Class object
>>
>> ......
>>
>> Object of CClassObjects collection haven't data stored in A table (the 
>> mostly nested)...
>>
>> I have to use the other solution... but it doesn't work.... Please help 
>> me ...
>>
>> Best regards
>> mario
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>



-- 
Używam M2 - innowacyjnego klienta poczty wbudowanego w Operę: 
http://www.opera.com/


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


Re: Three level inheritance problem - Null data from the mostly nested table

Posted by Armin Waibel <ar...@apache.org>.
Hi Mariusz,

did you try latest release (rc7)? Jakob fix a problem with inheritance 
between rc6 and rc7.

regards,
Armin

Mariusz Wójcik wrote:

> 
> Hi
> I try to realize three level of inheritance in OJB. My Class C extends 
> Class B extends Class A each data are stored
> in separate tables (Table A, Table B, Table C) . I've implemented it.
> Inserts work fine. Inheritance is OK, all data are stored in tables.All 
> references are OK.
> 
> I have problems with quering objects.
> I try to get all C Class object. In each object I can't get access to 
> data which are stored in A Table (they are null).
> But when I try to list A Class Objects, their data are complete.
> 
> I noticed very strange thing.
> 
> When I try to list object in this order, both methods works fine 
> (Collection returned by method getCClassObject is OK, all object,s data 
> are complete):
> .......
> 
> Collection AClassObjects=getAClassObjects(); //getting A Class objects
> Collection CClassObjects=getCClassObjects(); //getting C Class objects
> 
> .......
> 
> But my problems start when I try to invoke only one method:
> 
> ......
> 
> Collection CClassObjects=getCClassObjects(); //getting C Class object
> 
> ......
> 
> Object of CClassObjects collection haven't data stored in A table (the 
> mostly nested)...
> 
> I have to use the other solution... but it doesn't work.... Please help 
> me ...
> 
> Best regards
> mario
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 

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