code: function parseClause(array, index, clauseType, modelName, fieldName, parent) {
  		var item = array[index];
  
  		if (_.isString(item) || patches.isModel(item)) {
  			item = array[index] = {model: item};
  		} else if (!item.model) {
  			throw new Sequelize.VirtualFieldsError(clauseType + " of virtual field '" + modelName + "'.'" + fieldName + "' is invalid");
  		}
  
  		if (_.isString(item.model)) {
  			var model = parent.sequelize.models[item.model];
  			if (!model) throw new Sequelize.VirtualFieldsError(clauseType + " of virtual field '" + modelName + "'.'" + fieldName + "' points to unknown model '" + item.model + "'");
  			item.model = model;
  		} else if (!patches.isModel(item.model)) {
  			throw new Sequelize.VirtualFieldsError(clauseType + " of virtual field '" + modelName + "'.'" + fieldName + "' is invalid");
  		}
  
  		if (item.as !== undefined && !_.isString(item.as)) throw new Sequelize.VirtualFieldsError(clauseType + " of virtual field '" + modelName + "'.'" + fieldName + "' has invalid as clause '" + item.as + "'");
  
  		// check if is valid association from parent
  		if (!parent.getAssociation(item.model, item.as)) throw new Sequelize.VirtualFieldsError(clauseType + " of virtual field '" + modelName + "'.'" + fieldName + "' includes invalid association from '" + parent.name + "' to '" + item.model.name + (item.as ? ' (' + item.as + ')' : '') + "'");
  
  		return item;
  	}
docs: formats a clause into {model: model} format and checks association to parent is valid