public function update() {
    $this->requireTransaction();
    $request = $this->getRequest();

    $oidStr = $this->getFirstRequestOid();
    $isOrderRequest = $request->hasValue('referenceOid');
    if ($isOrderRequest) {
      // change order in all objects of the same type
      $request->setValue('insertOid', $this->getFirstRequestOid());

      // delegate to SortController
      $subResponse = $this->executeSubAction('moveBefore');

      // add sorted object to subresponse similar to default update action
      if (!$subResponse->hasErrors()) {
        $oid = ObjectId::parse($oidStr);
        $persistenceFacade = $this->getPersistenceFacade();
        $object = $persistenceFacade->load($oid);
        $subResponse->setValue('oid', $oid);
        $subResponse->setValue($oidStr, $object);
      }
    }
    else {
      // delegate to SaveController
      $subResponse = $this->executeSubAction('update');
    }

    // prevent commit
    if ($subResponse->hasErrors()) {
      $this->endTransaction(false);
    }
    $this->handleSubResponse($subResponse, $oidStr);
  }