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 Tue, 30 Sep 2003 08:20:32 GMT
Hej Oleg,

sorry that it took so much time to answer.

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

> I've implemented your fix in another way, but I hope it still 
> works, please tell me if I'm right ;-)

I have tried your fix, but the problem still exists.
If ReferencePrefetcher, lines 108 ff look like this ...

        while (iter.hasNext())
        {
            owner = iter.next();
            fkValues = ord.getForeignKeyValues(owner,cld);
//           if (!isNull(fkValues))
//           {
            id = new Identity(null, topLevelClass, fkValues);
            relatedObject = pb.getObjectByIdentity(id);
            field.set(owner, relatedObject);
//           }
        }

... this results in the following statements:

sql: statement|SELECT CLASS_NAME,PARENT_FK,CHILD_FK,ID 
  FROM X_TABLE WHERE ID = '101' 
sql: statement|SELECT A0.CLASS_NAME,A0.PARENT_FK,A0.CHILD_FK,A0.ID 
  FROM X_TABLE A0 WHERE ( A0.PARENT_FK =  '101' ) AND  
                        (A0.CLASS_NAME =  'org.apache.ojb.broker.XB' )
sql: statement|SELECT ID FROM XC_TABLE WHERE ID = '' 

If I uncomment if if-statement, the third statement 
is surpressed.  Do you think that whould do any harm?

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