db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/singlevm PersistenceBrokerImpl.java
Date Tue, 18 Feb 2003 07:07:54 GMT
thma        2003/02/17 23:07:54

  Modified:    src/java/org/apache/ojb/broker/singlevm
                        PersistenceBrokerImpl.java
  Log:
  fixed Identity bug in pb.storeToDb()
  
  Revision  Changes    Path
  1.131     +7 -8      db-ojb/src/java/org/apache/ojb/broker/singlevm/PersistenceBrokerImpl.java
  
  Index: PersistenceBrokerImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/singlevm/PersistenceBrokerImpl.java,v
  retrieving revision 1.130
  retrieving revision 1.131
  diff -u -r1.130 -r1.131
  --- PersistenceBrokerImpl.java	16 Feb 2003 17:26:12 -0000	1.130
  +++ PersistenceBrokerImpl.java	18 Feb 2003 07:07:53 -0000	1.131
  @@ -1808,13 +1808,12 @@
   
   
               // cache object for symmetry with getObjectByXXX()
  -            /*
  -            arminw
  -            TODO Check it out. Cache the object with Identity oid, because Cache does
  -            intern generate a new Identity object as key for the object.
  -            */
  -            // objectCache.cache(obj);
  -            objectCache.cache(oid, obj);
  +            
  +            // Create a new Identity based on the current set of primary key values.
  +            Identity newOid = new Identity(obj, this, cld);
  +            // Add the object to the cache.
  +            objectCache.cache(newOid, obj);
  +            
               // 4. store 1:n and m:n associations
               storeCollections(obj, cld.getCollectionDescriptors());
           }
  
  
  

Mime
View raw message