code: public Pipeline saveWithStages(Pipeline pipeline) {
          updateCounter(pipeline);
          Pipeline savedPipeline = save(pipeline);
          for (Stage stage : pipeline.getStages()) {
              stageDao.saveWithJobs(savedPipeline, stage);
          }
          return savedPipeline;
      }
docs: This is only used in test for legacy purpose. Please call pipelineService.save(aPipeline) instead.
  <p/>
  This is particularly bad as it does NOT do the same as what the system does in the real code.
  In particular it does not save the JobInstances correctly. We need to remove this method and make
  sure that tests are using the same behaviour as the real code.
  
  @see { Mingle #2867}
  @deprecated