Model.translateAliases()

Parameters
  • raw «Object» fields/conditions that may contain aliased keys
Returns:
  • «Object» the translated ‘pure’ fields/conditions

Translate any aliases fields/conditions so the final query or document object is pure

Example:

  1. Character
  2. .find(Character.translateAliases({
  3. '名': 'Eddard Stark' // Alias for 'name'
  4. })
  5. .exec(function(err, characters) {})

Note:

Only translate arguments of object type anything else is returned raw