lib/memory-engine.js
function read(id, callback) {
    var query = {}

    self.emit('read', id)
    callback = callback || emptyFn
    query[options.idProperty] = '' + id
    findByQuery(query, {}, function (error, objects) {
      if (objects[0] !== undefined) {
        var cloned = extend({}, objects[0])
        self.emit('received', cloned)
        callback(undefined, cloned)
      } else {
        callback(undefined, undefined)
      }
    })
  }
function read(id, callback) {
    var query = {}

    self.emit('read', id)
    callback = callback || emptyFn
    query[options.idProperty] = '' + id
    findByQuery(query, {}, function (error, objects) {
      if (objects[0] !== undefined) {
        var cloned = extend({}, objects[0])
        self.emit('received', cloned)
        callback(undefined, cloned)
      } else {
        callback(undefined, undefined)
      }
    })
  }
function read ( id , callback ) { var query = { } self . emit ( 'read' , id ) callback = callback || emptyFn query [ options . idProperty ] = '' + id findByQuery ( query , { } , function ( error , objects ) { if ( objects [ 0 ] !== undefined ) { var cloned = extend ( { } , objects [ 0 ] ) self . emit ( 'received' , cloned ) callback ( undefined , cloned ) } else { callback ( undefined , undefined ) } } ) }
Reads a single entity. Emits a 'read' event.

@param {Number} id to read
@param {Function} callback (optional)
@api public
Reads a single entity . Emits a read event .