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/odmg TransactionImpl.java
Date Sat, 14 Aug 2004 23:31:01 GMT
arminw      2004/08/14 16:31:01

  Modified:    src/java/org/apache/ojb/odmg TransactionImpl.java
  Log:
  merge with branch
  
  Revision  Changes    Path
  1.60      +8 -18     db-ojb/src/java/org/apache/ojb/odmg/TransactionImpl.java
  
  Index: TransactionImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/TransactionImpl.java,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- TransactionImpl.java	24 Jun 2004 15:36:56 -0000	1.59
  +++ TransactionImpl.java	14 Aug 2004 23:31:01 -0000	1.60
  @@ -17,7 +17,6 @@
   
   import javax.transaction.Status;
   import java.util.ArrayList;
  -import java.util.Arrays;
   import java.util.Collection;
   import java.util.Enumeration;
   import java.util.Hashtable;
  @@ -871,31 +870,22 @@
           {
               if (!ProxyHelper.isProxy(obj) && (ref != null))
               {
  -                Object refInstance = ProxyHelper.getRealObject(ref);
  +                Class refClass = ProxyHelper.getRealClass(ref);
                   ClassDescriptor objCld = this.getBroker().getClassDescriptor(obj.getClass());
                   FieldDescriptor[] objFkFields = rds.getForeignKeyFieldDescriptors(objCld);
   
  -                // oma: refInstance might be null in case of dangling foreign keys.
                   ValueContainer[] refPkValues;
  -                if (refInstance != null)
  -                {
  -                    ClassDescriptor refCld = this.getBroker().getClassDescriptor(refInstance.getClass());
  -                    refPkValues = getBroker().serviceBrokerHelper().getKeyValues(refCld,
refInstance, false);
  -                }
  -                else
  -                {
  -                    refPkValues = new ValueContainer[objFkFields.length];
  -                    Arrays.fill(refPkValues, null);
  -                }
  +                ClassDescriptor refCld = this.getBroker().getClassDescriptor(refClass);
  +                refPkValues = getBroker().serviceBrokerHelper().getKeyValues(refCld, ref,
false);
   
  -                /**
  +                /*
                    * MBAIRD:
  -                 * objFkFields could end up being null in case of non-mapped indirection
table of m:n relationship
  -                 *
  +                 * objFkFields could end up being null in case of non-mapped indirection
table
  +                 * of m:n relationship
                    */
                   if (objFkFields != null)
                   {
  -                    org.apache.ojb.broker.metadata.FieldDescriptor fld = null;
  +                    FieldDescriptor fld = null;
                       for (int i = 0; i < objFkFields.length; i++)
                       {
                           fld = objFkFields[i];
  
  
  

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