db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer CollectionPrefetcher.java
Date Sun, 14 Dec 2003 11:03:16 GMT
brj         2003/12/14 03:03:16

  Modified:    src/java/org/apache/ojb/broker/accesslayer
                        CollectionPrefetcher.java
  Log:
  use ProxyHelper#getRealClass because relatedObject could be Proxy
  
  Revision  Changes    Path
  1.20      +4 -3      db-ojb/src/java/org/apache/ojb/broker/accesslayer/CollectionPrefetcher.java
  
  Index: CollectionPrefetcher.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/CollectionPrefetcher.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- CollectionPrefetcher.java	13 Dec 2003 11:59:02 -0000	1.19
  +++ CollectionPrefetcher.java	14 Dec 2003 11:03:15 -0000	1.20
  @@ -73,6 +73,7 @@
   import org.apache.ojb.broker.query.Query;
   import org.apache.ojb.broker.query.QueryByCriteria;
   import org.apache.ojb.broker.util.BrokerHelper;
  +import org.apache.ojb.broker.util.ProxyHelper;
   import org.apache.ojb.broker.util.collections.RemovalAwareCollection;
   
   /**
  @@ -177,8 +178,8 @@
           for (Iterator it = children.iterator(); it.hasNext();)
           {
               relatedObject = it.next();
  -            // BRJ: use cld of real class
  -            cld = getDescriptorRepository().getDescriptorFor(relatedObject.getClass());
  +            // BRJ: use cld for real class, relatedObject could be Proxy
  +            cld = getDescriptorRepository().getDescriptorFor(ProxyHelper.getRealClass(relatedObject));
               fkValues = cds.getForeignKeyValues(relatedObject, cld);
               id = new Identity(null, ownerTopLevelClass, fkValues);
               list = (ArrayList) ownerIdsToLists.get(id);
  
  
  

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