db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/cache CachingStrategyTwoLevelImpl.java
Date Sun, 25 Sep 2005 01:44:39 GMT
arminw      2005/09/24 18:44:39

  Modified:    src/java/org/apache/ojb/broker/cache
                        CachingStrategyTwoLevelImpl.java
  Log:
  fix bug: copy super-reference fields too
  
  Revision  Changes    Path
  1.3       +8 -3      db-ojb/src/java/org/apache/ojb/broker/cache/CachingStrategyTwoLevelImpl.java
  
  Index: CachingStrategyTwoLevelImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/cache/CachingStrategyTwoLevelImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CachingStrategyTwoLevelImpl.java	3 Sep 2005 15:28:15 -0000	1.2
  +++ CachingStrategyTwoLevelImpl.java	25 Sep 2005 01:44:39 -0000	1.3
  @@ -125,7 +125,7 @@
           // we store field values by name in a Map
           HashMap target = oldEntry != null ? (HashMap) oldEntry.getObject() : new HashMap();
           // perform main object values
  -        FieldDescriptor[] flds = cld.getFieldDescriptions();
  +        FieldDescriptor[] flds = cld.getFieldDescriptor(true);
           FieldDescriptor fld;
           for(int i = 0; i < flds.length; i++)
           {
  @@ -157,7 +157,7 @@
       {
           ObjectFactory     factory           = getBroker().getConfiguration().getObjectFactory();
           FieldDescriptor[] creationFields    = cld.getCreationArgumentFields();
  -        FieldDescriptor[] nonCreationFields = cld.getNonCreationArgumentFields();
  +        FieldDescriptor[] nonCreationFields = cld.getNonCreationArgumentFields(true);
           Object            target            = factory.newInstance(cld, getFieldValues(source,
creationFields));
           Object[]          fieldValues       = getFieldValues(source, nonCreationFields);
   
  @@ -235,5 +235,10 @@
           {
               return obj;
           }
  +
  +        public String toString()
  +        {
  +            return "[ObjectEntry: obj=" + obj + "]";
  +        }
       }
   }
  
  
  

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