db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oliver.m...@ppi.de
Subject RE: superflous, long queries in CVS HEAD (Batch retrieval)
Date Mon, 06 Oct 2003 15:41:07 GMT
Hej Oleg,

> -----Original Message-----
> From: Oleg Nitz [mailto:on@ukr.net]

> I just like to understand what happens. Look, in the 
> buildPrefetchQueries() 
> method, line 150, I've added:
> 
>             fkValues = ord.getForeignKeyValues(owner,cld);
>             if (isNull(fkValues))
>             {
>                 continue;
>             }
> 
> thus null fkValues will not be added to the list of fk values.

That is true.  In my example, that continue takes place,
an thus the method buildPrefetchQueries returns an array of
length 0.  The owners collection has size 1 and contains
an object with null-references.

> So in the associateBatched() after 
> 
>             fkValues = ord.getForeignKeyValues(owner,cld);
> 
> the condition "isNull(fkValues)" should be always false.
> But in your example it sometimes happens to be true, right?

That is true.  Later, in the same call of prefetchRelationship(),
the method associateBatched is called with that same 
owners collection. 
After the line has been reached, fkValues is an array of length 1
with fkValues[0]==null.

> Do you have any ideas about how this can happen? 

Conversely, I would like to understand why it shouldn't?

Shall I send you the example so that you can reproduce
the problem?

Olli

---------------------------------------------------------------------
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