lib/base.js
function (query, queryOptions, callback) {
    if (!queryOptions) {
      callback = query;
      query = {};
      queryOptions = {};
    } else if (!callback) {
      callback = queryOptions;
      queryOptions = {};
    }

    this.find(query, queryOptions, function (err, items) {
      if (err) {
        return callback(err);
      }
      callback(null, items[0]);
    });
  }
function (query, queryOptions, callback) {
    if (!queryOptions) {
      callback = query;
      query = {};
      queryOptions = {};
    } else if (!callback) {
      callback = queryOptions;
      queryOptions = {};
    }

    this.find(query, queryOptions, function (err, items) {
      if (err) {
        return callback(err);
      }
      callback(null, items[0]);
    });
  }
function ( query , queryOptions , callback ) { if ( ! queryOptions ) { callback = query ; query = { } ; queryOptions = { } ; } else if ( ! callback ) { callback = queryOptions ; queryOptions = { } ; } this . find ( query , queryOptions , function ( err , items ) { if ( err ) { return callback ( err ) ; } callback ( null , items [ 0 ] ) ; } ) ; }
Use this function to find one viewmodel.
@param  {String}   query    The query to find the viewmodel. (mongodb style) [optional]
@param  {Function} callback The function, that will be called when the this action is completed.
`function(err, vm){}` vm is of type Object.
Use this function to find one viewmodel .