docs: function DbEntity(table, entity, opts, pool, logger){
    LOGGER = logger;
    this.pool = pool;
    this.table = table;
    this.entity = entity;
  
    if(_.isNil(opts)||_.isNil(opts.plural)){
      if(_.endsWith(entity,'y')){
        this.plural = entity.substr(0, entity.lastIndexOf('y')) + 'ies';
      } else if (_.endsWith(entity,'s')) {
        this.plural = entity.substr(0, entity.lastIndexOf('s')) + 'es';
      } else {
        this.plural = entity + 's';
      }
    } else {
      this.plural = opts.plural;
    }
  
    this.options = (opts || {
      created_timestamp_column: 'created',
      updated_timestamp_column: 'updated',
      version_number_column: 'version',
      log_category: 'db'
    });
  
    if(logger && LOGGER.info){
      LOGGER = logger;
    } else {
      //use winston
      LOGGER = {error: console.log, warn: console.log, info: function(){}, debug: function(){}, silly: function(){} }
    }
  
    this.metadata = null;//initialized to empty.
  }