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/metadata AnonymousObjectReferenceDescriptor.java ClassDescriptor.java
Date Thu, 06 May 2004 19:40:36 GMT
brj         2004/05/06 12:40:36

  Modified:    src/java/org/apache/ojb/broker/metadata
                        AnonymousObjectReferenceDescriptor.java
                        ClassDescriptor.java
  Log:
  look for fieldDescriptor in Classdescriptor referenced by 'super'
  
  Revision  Changes    Path
  1.9       +4 -2      db-ojb/src/java/org/apache/ojb/broker/metadata/AnonymousObjectReferenceDescriptor.java
  
  Index: AnonymousObjectReferenceDescriptor.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/AnonymousObjectReferenceDescriptor.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AnonymousObjectReferenceDescriptor.java	4 Apr 2004 23:53:34 -0000	1.8
  +++ AnonymousObjectReferenceDescriptor.java	6 May 2004 19:40:36 -0000	1.9
  @@ -21,6 +21,8 @@
   {
       private static final long serialVersionUID = -9132555799710533265L;
       
  +    public static final String ANONYMOUS_NAME = null;
  +    
   	public AnonymousObjectReferenceDescriptor(ClassDescriptor descriptor)
   	{
   		super(descriptor);
  @@ -31,8 +33,8 @@
           // BRJ :
           // no field name for anonymous 'super' reference to
           // prevent using this reference in queries.
  -
  -        m_PersistentField = new AnonymousPersistentFieldForInheritance(m_ClassDescriptor,
null);
  +	    //
  +        m_PersistentField = new AnonymousPersistentFieldForInheritance(m_ClassDescriptor,
ANONYMOUS_NAME);
       }
   }
   
  
  
  
  1.85      +19 -2     db-ojb/src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java
  
  Index: ClassDescriptor.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- ClassDescriptor.java	9 Apr 2004 13:22:30 -0000	1.84
  +++ ClassDescriptor.java	6 May 2004 19:40:36 -0000	1.85
  @@ -517,7 +517,24 @@
               m_objectReferenceDescriptorsNameMap = nameMap;
           }
   
  -        return (ObjectReferenceDescriptor) m_objectReferenceDescriptorsNameMap.get(name);
  +        ObjectReferenceDescriptor ord = (ObjectReferenceDescriptor) m_objectReferenceDescriptorsNameMap.get(name);
  +        
  +        // 
  +        // BRJ: if the ReferenceDescriptor is not found
  +        // look in the ClassDescriptor referenced by 'super' for it
  +        //
  +        if (ord == null)
  +        {
  +            ObjectReferenceDescriptor superOrd = 
  +                (ObjectReferenceDescriptor) m_objectReferenceDescriptorsNameMap.get(AnonymousObjectReferenceDescriptor.ANONYMOUS_NAME);
  +            
  +            if (superOrd != null)
  +            {
  +                ClassDescriptor superCld = getRepository().getDescriptorFor(superOrd.getItemClass());
  +                ord = superCld.getObjectReferenceDescriptorByName(name);
  +            }
  +        }
  +        return ord;
       }
   
       /**
  
  
  

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