message: IModelDb.saveChanges must fail if there are any pending, un-processed requests for locks or codes
diff: @@ -229,13 +229,13 @@ export class IModelDb extends IModel {
  /**
  * Commit pending changes to this iModel
  * @param _description Optional description of the changes
  - * @throws [[IModelError]] if there is a problem saving changes.
  + * @throws [[IModelError]] if there is a problem saving changes or if there are requests for locks or codes that have yet to be processed. See [[ConcurrencyControl.request]]
  */
  public saveChanges(description?: string) {
  if (!this.briefcaseInfo)
  throw this._newNotOpenError();
  - if (this.concurrencyControl.inBulkOperationWithPendingRequests())
  + if (this.concurrencyControl.hasPendingRequests())
  throw new IModelError(IModelStatus.TransactionActive);
  const stat = this.briefcaseInfo.nativeDb.saveChanges(description);
  @@ -474,6 +474,20 @@ export class ConcurrencyControl {
  return this._pendingRequest;
  }
  + /** Are there pending, unprocessed requests for locks or codes? */
  + public hasPendingRequests(): boolean {
  + if (!this._imodel.briefcaseInfo)
  + return false;
  + if (this.inBulkOperationWithPendingRequests())
  + return true;
  + if (this._pendingRequest !== undefined) {
  + const reqAny: any = ConcurrencyControl.convertRequestToAny(this._pendingRequest);
  + if (reqAny.Codes.length !== 0 || reqAny.Locks.length !== 0)
  + return true;
  + }
  + return false;
  + }
  +
  /**
  * Take ownership of all or some of the pending request for locks and codes.
  * @param locksOnly If true, only the locks in the pending request are extracted. The default is to extract all requests.
  