Defect updatedDefect = Defect.fromJSON(content);
List<ValidationIssue> issues = validator.validate(session, updatedDefect, Mode.EDIT);
if(issues.size() > 0) {
// TODO: pass errors to client through exception
throw new BadRequestException();
}
/*
* Because of the disconnected objects problem in db4o, we can't just save updatedDefect.
* We have to get the original defect from db4o, copy properties from updatedDefect,