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 ClassDescriptor.java
Date Fri, 11 Mar 2005 20:50:14 GMT
brj         2005/03/11 12:50:14

  Modified:    src/java/org/apache/ojb/broker/metadata ClassDescriptor.java
  Log:
  fix for armin's reference problem
  
  Revision  Changes    Path
  1.102     +11 -3     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.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- ClassDescriptor.java	11 Mar 2005 19:05:18 -0000	1.101
  +++ ClassDescriptor.java	11 Mar 2005 20:50:13 -0000	1.102
  @@ -1116,6 +1116,7 @@
           FieldDescriptor fld = null;
           String currPath = aPath;
           String segment;
  +        StringBuffer processedSegment = new StringBuffer();
           int sepPos;
           Class itemClass = null;
   
  @@ -1133,6 +1134,12 @@
                   currPath = "";
               }
   
  +            if (processedSegment.length() > 0)
  +            {
  +                processedSegment.append(".");
  +            }           
  +            processedSegment.append(segment); 
  +            
               // look for 1:1 or n:1 Relationship
               ord = cld.getObjectReferenceDescriptorByName(segment);
               if (ord == null)
  @@ -1143,8 +1150,9 @@
   
               if (ord != null)
               {
  -                // BRJ : look for hint
  -                List hintClasses = (List) pathHints.get(segment);
  +                // BRJ : look for hints for the processed segment
  +                // ie: ref pointng to ClassA and ref.ref pointing to ClassC 
  +                List hintClasses = (List) pathHints.get(processedSegment.toString());
                   if (hintClasses != null && hintClasses.get(0) != null)
                   {
                       itemClass = (Class) hintClasses.get(0);
  
  
  

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