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/jdori/org/apache/ojb/jdori/sql OjbStoreManager.java
Date Mon, 03 Mar 2003 18:40:09 GMT
thma        2003/03/03 10:40:09

  Modified:    src/jdori/org/apache/ojb/jdori/sql OjbStoreManager.java
  Log:
  fix handling of identities
  
  Revision  Changes    Path
  1.2       +8 -8      db-ojb/src/jdori/org/apache/ojb/jdori/sql/OjbStoreManager.java
  
  Index: OjbStoreManager.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/jdori/org/apache/ojb/jdori/sql/OjbStoreManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OjbStoreManager.java	24 Dec 2002 12:06:01 -0000	1.1
  +++ OjbStoreManager.java	3 Mar 2003 18:40:09 -0000	1.2
  @@ -216,13 +216,13 @@
           PersistenceBroker broker = connector.getBroker();
           try
           {
  +        	Object instance = sm.getObject();
               Identity oid = (Identity) sm.getInternalObjectId();
               if (oid == null)
  -            {
  -                Object instance = sm.getObject();
  -                oid = new Identity(instance);
  +            {                
  +                oid = new Identity(instance,broker);
               }
  -            broker.removeFromCache(oid);
  +            broker. removeFromCache(instance);
               PersistenceCapable pc = (PersistenceCapable) broker.getObjectByIdentity(oid);
   
               JDOClass jdoClass = this.getJDOClass(pc.getClass());
  @@ -279,7 +279,7 @@
           PersistenceManagerInternal pm)
       {
           PersistenceCapable obj = sm.getObject();
  -        Identity oid = new Identity(obj);
  +        Identity oid = new Identity(obj, connector.getBroker());
           return oid;
       }
   
  @@ -293,7 +293,7 @@
           Class cls,
           PersistenceManagerInternal pm)
       {
  -        return new Identity(pc);
  +        return new Identity(pc, connector.getBroker());
       }
   
       /**
  @@ -302,7 +302,7 @@
        */
       public synchronized Object getExternalObjectId(Object objectId, PersistenceCapable
pc)
       {
  -        return new Identity(pc);
  +        return new Identity(pc, connector.getBroker());
       }
   
       /**
  @@ -310,7 +310,7 @@
        */
       public void copyKeyFieldsFromObjectId(StateManagerInternal sm, Class pcClass)
       {
  -        new Identity(sm.getObject());
  +        new Identity(sm.getObject(), connector.getBroker());
       }
   
       /**
  
  
  

Mime
View raw message