code: public static boolean hasAnonymousKeyReference(ClassDescriptor cld, ObjectReferenceDescriptor rds)
      {
          boolean result = false;
          FieldDescriptor[] fkFields = rds.getForeignKeyFieldDescriptors(cld);
          for(int i = 0; i < fkFields.length; i++)
          {
              FieldDescriptor fkField = fkFields[i];
              if(fkField.isAnonymous())
              {
                  result = true;
                  break;
              }
          }
          return result;
      }
docs: Returns <em>true</em> if one or more anonymous FK fields are used.
  @param cld The {@link org.apache.ojb.broker.metadata.ClassDescriptor} of the main object.
  @param rds The {@link org.apache.ojb.broker.metadata.ObjectReferenceDescriptor} of the referenced object.
  @return <em>true</em> if one or more anonymous FK fields are used for specified reference.