code: function parseOrders(field, fieldName, model) {
  		var orders = field.order;
  		if (!orders) return;
  		if (!Array.isArray(orders)) orders = field.order = [orders];
  
  		_.forEach(orders, function(order, index) {
  			// if just a string, leave alone - is raw query
  			if (_.isString(order)) return;
  
  			// if an object (e.g. {raw: ...}), add 'ASC' sort order
  			if (!Array.isArray(order)) {
  				orders[index] = [order, 'ASC'];
  				return;
  			}
  
  			// add 'ASC' sort order if no sort order defined
  			if (order.length == 0) throw new Sequelize.VirtualFieldsError("Invalid virtual field order in '" + model.name + "'.'" + fieldName + "'");
  			if (order.length == 1) {
  				order[1] = 'ASC';
  			} else {
  				// ensure direction is ASC or DESC
  				if (['ASC', 'DESC'].indexOf(order[order.length - 1].toUpperCase()) == -1) {
  					order.push('ASC');
  				} else {
  					order[order.length - 1] = order[order.length - 1].toUpperCase();
  				}
  			}
  
  			// make preceeding models into {model: model} form
  			var parent = model;
  			for (var i = 0; i < order.length - 2; i++) {
  				parseClause(order, i, 'Order', model.name, fieldName, parent);
  				parent = order[i].model;
  			}
  
  			// check attribute is valid
  			var attribute = order[order.length - 2];
  			if (_.isString(attribute) && !parent.attributes[attribute]) throw new Sequelize.VirtualFieldsError("Order of virtual field '" + model.name + "'.'" + fieldName + "' refers to a nonexistent field '" + parent.name + "'.'" + attribute + "'");
  		});
  	}
docs: parses order attribute converting all models to {model: model} format, adding ASC/DESC order and checking attributes are valid and model associations are valid