db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From olegn...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/metadata CollectionDescriptor.java
Date Sun, 14 Dec 2003 12:00:21 GMT
olegnitz    2003/12/14 04:00:21

  Modified:    src/java/org/apache/ojb/broker/metadata
                        CollectionDescriptor.java
  Log:
  Oops! Forgot to check for proxy the collection item class itself
  
  Revision  Changes    Path
  1.24      +18 -9     db-ojb/src/java/org/apache/ojb/broker/metadata/CollectionDescriptor.java
  
  Index: CollectionDescriptor.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/CollectionDescriptor.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- CollectionDescriptor.java	13 Dec 2003 17:35:43 -0000	1.23
  +++ CollectionDescriptor.java	14 Dec 2003 12:00:21 -0000	1.24
  @@ -412,14 +412,23 @@
           {
               DescriptorRepository repo = getClassDescriptor().getRepository();
               ClassDescriptor cld = repo.getDescriptorFor(getItemClass());
  -            Collection extents = cld.getExtentClasses();
  -            m_hasProxyItems = Boolean.FALSE;
  -            for (Iterator it = extents.iterator(); it.hasNext(); ) {
  -                Class ext = (Class) it.next();
  -                ClassDescriptor cldExt = repo.getDescriptorFor(ext);
  -                if (cldExt.getProxyClass() != null) {
  -                    m_hasProxyItems = Boolean.TRUE;
  -                    break;
  +            if (cld.getProxyClass() != null) 
  +            {
  +                m_hasProxyItems = Boolean.TRUE;
  +            } 
  +            else 
  +            {
  +                Collection extents = cld.getExtentClasses();
  +                m_hasProxyItems = Boolean.FALSE;
  +                for (Iterator it = extents.iterator(); it.hasNext(); )
  +                {
  +                    Class ext = (Class) it.next();
  +                    ClassDescriptor cldExt = repo.getDescriptorFor(ext);
  +                    if (cldExt.getProxyClass() != null)
  +                    {
  +                        m_hasProxyItems = Boolean.TRUE;
  +                        break;
  +                    }
                   }
               }
           }
  
  
  

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