code: public void checkRefreshRelationships(Object obj, Identity oid, ClassDescriptor cld)
      {
          Iterator iter;
          CollectionDescriptor cds;
          ObjectReferenceDescriptor rds;
          // to avoid problems with circular references, locally cache the current object instance
          Object tmp = getInternalCache().doLocalLookup(oid);
          if(tmp != null && getInternalCache().isEnabledMaterialisationCache())
          {
              /*
              arminw: This should fix OJB-29, infinite loops on bidirectional 1:1 relations with
              refresh attribute 'true' for both references. OJB now assume that the object is already
              refreshed when it's cached in the materialisation cache
              */
              return;
          }
          try
          {
              getInternalCache().enableMaterializationCache();
              if(tmp == null)
              {
                  getInternalCache().doInternalCache(oid, obj, MaterializationCache.TYPE_TEMP);
              }
              if(logger.isDebugEnabled()) logger.debug("Refresh relationships for " + oid);
              iter = cld.getCollectionDescriptors().iterator();
              while (iter.hasNext())
              {
                  cds = (CollectionDescriptor) iter.next();
                  if (cds.isRefresh())
                  {
                      referencesBroker.retrieveCollection(obj, cld, cds, false);
                  }
              }
              iter = cld.getObjectReferenceDescriptors().iterator();
              while (iter.hasNext())
              {
                  rds = (ObjectReferenceDescriptor) iter.next();
                  if (rds.isRefresh())
                  {
                      referencesBroker.retrieveReference(obj, cld, rds, false);
                  }
              }
              getInternalCache().disableMaterializationCache();
          }
          catch(RuntimeException e)
          {
              getInternalCache().doLocalClear();
              throw e;
          }
      }
docs: Check if the references of the specified object have enabled
  the <em>refresh</em> attribute and refresh the reference if set <em>true</em>.
  
  @throws PersistenceBrokerException if there is a error refreshing collections or references
  @param obj The object to check.
  @param oid The {@link Identity} of the object.
  @param cld The {@link org.apache.ojb.broker.metadata.ClassDescriptor} of the object.