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 Thu, 06 Mar 2003 08:25:52 GMT
brj         2003/03/06 00:25:50

  Modified:    src/java/org/apache/ojb/broker/accesslayer
                        CollectionPrefetcher.java
  Log:
  prevent duplicates
  
  Revision  Changes    Path
  1.10      +7 -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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CollectionPrefetcher.java	22 Feb 2003 10:27:58 -0000	1.9
  +++ CollectionPrefetcher.java	6 Mar 2003 08:25:49 -0000	1.10
  @@ -223,13 +223,17 @@
                           getLogger().error("Can't create new Collection for owner", e);
                       }
                   }
  -                relatedData.add(relatedObject);
  +                
  +                // BRJ: do not add object if it's already in the list
  +                if (!relatedData.contains(relatedObject))
  +                {
  +                    relatedData.add(relatedObject);
  +                }
               }
               else
               {
                   getLogger().error("prefetch works with Collections only");
               }
  -
           }
       }
   
  
  
  

Mime
View raw message