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/singlevm PersistenceBrokerImpl.java
Date Fri, 25 Apr 2003 12:05:24 GMT
brj         2003/04/25 05:05:24

  Modified:    src/java/org/apache/ojb/broker/singlevm
                        PersistenceBrokerImpl.java
  Log:
  delete m:n implementor for null relationship.
  fix by galvin hsiu
  
  Revision  Changes    Path
  1.159     +10 -2     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.158
  retrieving revision 1.159
  diff -u -r1.158 -r1.159
  --- PersistenceBrokerImpl.java	24 Apr 2003 20:36:27 -0000	1.158
  +++ PersistenceBrokerImpl.java	25 Apr 2003 12:05:24 -0000	1.159
  @@ -751,7 +751,15 @@
               Object col = cds.getPersistentField().get(obj);
               Collection currentMtoNKeys = null;
   
  -            if (col != null)
  +            if (col == null)
  +            {
  +                if (cds.isMtoNRelation())
  +                {
  +                    // delete all rows from m:n table belonging to obj
  +                    deleteMtoNImplementor(cds, obj);
  +                }            
  +            }
  +            else
               {
                   // MBAIRD
                   // if the collection is a collectionproxy and it's not already loaded
  
  
  

Mime
View raw message