async insertOne(entity) {
    if (entity.orgId === undefined) {
      return false;
    }

    this.dbManager.context.log.v('insertOne: ' + util.inspect(entity, { showHidden: true, depth: 5 }));

    try {
      await this.dbManager.dbo.collection(this.getTableName()).insertOne(entity);
    } catch (e) {
      this.dbManager.context.log.w('insertOne error: ' + util.inspect(e, { showHidden: true, depth: 5 }));
      return false;
    }

    return true;
  }
/**
   * Inserts an entity to this table.
   * @param  {Object}             entity the entity to be inserted
   * @return {Promise<boolean>}          true if successful, false otherwise
   */
Inserts an entity to this table.
@param  {Object}             entity the entity to be inserted
@return {Promise}          true if successful, false otherwise
Inserts an entity to this table . @param { Object } entity the entity to be inserted @return { Promise } true if successful false otherwise
async insertOne(entity) {
    if (entity.orgId === undefined) {
      return false;
    }
    this.dbManager.context.log.v('insertOne: ' + util.inspect(entity, { showHidden: true, depth: 5 }));
    try {
      await this.dbManager.dbo.collection(this.getTableName()).insertOne(entity);
    } catch (e) {
      this.dbManager.context.log.w('insertOne error: ' + util.inspect(e, { showHidden: true, depth: 5 }));
      return false;
    }
    return true;
  }
async insertOne ( entity ) { if ( entity . orgId === undefined ) { return false ; } this . dbManager . context . log . v ( 'insertOne: ' + util . inspect ( entity , { showHidden : true , depth : 5 } ) ) ; try { await this . dbManager . dbo . collection ( this . getTableName ( ) ) . insertOne ( entity ) ; } catch ( e ) { this . dbManager . context . log . w ( 'insertOne error: ' + util . inspect ( e , { showHidden : true , depth : 5 } ) ) ; return false ; } return true ; }
Inserts an entity to this table.
Inserts an entity to this table .