db-ojb-dev mailing list archives

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

  Modified:    src/java/org/apache/ojb/broker/singlevm
                        PersistenceBrokerImpl.java
  Log:
  warn the user if an object can not be part of a collection because its not subtype of the
right class, or a proxy
  
  Revision  Changes    Path
  1.132     +14 -1     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.131
  retrieving revision 1.132
  diff -u -r1.131 -r1.132
  --- PersistenceBrokerImpl.java	18 Feb 2003 07:07:53 -0000	1.131
  +++ PersistenceBrokerImpl.java	18 Feb 2003 18:23:51 -0000	1.132
  @@ -1051,6 +1051,10 @@
        */
       private void retrieveCollection(Object obj, ClassDescriptor cld, CollectionDescriptor
cds, boolean forced)
       {
  +//         logger.debug("Retrieving collection ["+cds.getCascadeRetrieve()
  +//                      +"] MtoN ["+cds.isMtoNRelation()
  +//                      +"] for "+obj.getClass().getName());
  +        
           if (forced || cds.getCascadeRetrieve())
           {
               // this collection type will be used:
  @@ -1287,6 +1291,15 @@
                           result.ojbAdd(candidate);
                           retrievedCount++;
                       }
  +                    else
  +                    {
  +                        //warn the user
  +                        logger.warn("Candidate object ["+candidate
  +                                    +"] class ["+candidate.getClass().getName()
  +                                    +"] is not a subtype of ["+itemClass.getName()
  +                                    +"] or any type of proxy. NOT INCLUDED in result collection");
  +                    }
  +
                   }
               }
               /**
  
  
  

Mime
View raw message