Summary
GET /api/v1/glossaryTerms/{id}/versions/{v} returns 500 on any glossary term that had relatedTerms set on 1.12.x and was upgraded to 1.13+. PR #26586 cleaned glossary_term_entity, but missed the version snapshots in entity_extension.
Symptom
UnrecognizedPropertyException: Unrecognized field "id" (class TermRelation),
not marked as ignorable (2 known properties: "term", "relationType")
The version-history page in the UI fails to load for affected terms. Diff rendering (strikethrough/green for related-term changes) also breaks because of legacy shape inside changeDescription value strings.
Root cause
Pre-1.13 wrote relatedTerms as EntityReference[] (top-level id/name/type). PR #25886 changed the schema to TermRelation[] ({term, relationType}) with extra: forbid.
Version reads (EntityRepository.getVersion) deserialize entity_extension JSON directly:
String json = daoCollection.entityExtensionDAO().getExtension(id, extension);
if (json != null) {
return JsonUtils.readValue(json, entityClass);
}
No entity_relationship rehydration on this path — the legacy snapshot JSON is parsed straight into GlossaryTerm, and Jackson rejects the unknown id field on TermRelation.
The same legacy shape lives inside changeDescription.fieldsAdded[*].newValue / fieldsDeleted[*].oldValue strings, which the 1.13 UI's diff renderer (expecting TermRelation) cannot render.
Fix approach
Java migration in v1130 that transforms legacy EntityReference[] items into TermRelation[] ({term: <ref>, relationType: "relatedTo"}) at both the top-level relatedTerms field and inside changeDescription diff strings. A strip would silently lose history per version.
PR
#27770
Affected versions
- 1.13.0+ (after upgrade from any 1.12.x install with non-empty
relatedTerms)
Summary
GET /api/v1/glossaryTerms/{id}/versions/{v}returns 500 on any glossary term that hadrelatedTermsset on 1.12.x and was upgraded to 1.13+. PR #26586 cleanedglossary_term_entity, but missed the version snapshots inentity_extension.Symptom
The version-history page in the UI fails to load for affected terms. Diff rendering (strikethrough/green for related-term changes) also breaks because of legacy shape inside
changeDescriptionvalue strings.Root cause
Pre-1.13 wrote
relatedTermsasEntityReference[](top-levelid/name/type). PR #25886 changed the schema toTermRelation[]({term, relationType}) withextra: forbid.Version reads (
EntityRepository.getVersion) deserializeentity_extensionJSON directly:No
entity_relationshiprehydration on this path — the legacy snapshot JSON is parsed straight intoGlossaryTerm, and Jackson rejects the unknownidfield onTermRelation.The same legacy shape lives inside
changeDescription.fieldsAdded[*].newValue/fieldsDeleted[*].oldValuestrings, which the 1.13 UI's diff renderer (expectingTermRelation) cannot render.Fix approach
Java migration in v1130 that transforms legacy
EntityReference[]items intoTermRelation[]({term: <ref>, relationType: "relatedTo"}) at both the top-levelrelatedTermsfield and insidechangeDescriptiondiff strings. A strip would silently lose history per version.PR
#27770
Affected versions
relatedTerms)