private final Map<String, Object> convertToMap(R record) {
Map<String, Object> map = new LinkedHashMap<String, Object>();
for (Field<?> field : record.getFields()) {
if (map.put(field.getName(), record.getValue(field)) != null) {
throw new InvalidResultException("Field " + field.getName() + " is not unique in Record for " + this);
}
}
return map;
}