Skip to content
Snippets Groups Projects
Unverified Commit 708f9bd1 authored by Thomas Mortagne's avatar Thomas Mortagne
Browse files

XWIKI-22916: The xclass migrator is modifying the cached document

(cherry picked from commit ba6d468c)
parent 2cb576f5
No related branches found
No related tags found
No related merge requests found
......@@ -181,6 +181,9 @@ private void migrate(PropertyClass newPropertyClass, BaseProperty<?> newProperty
if (!document.isNew()) {
boolean modified = false;
// Avoid modifying the cached document
document = document.clone();
for (BaseObject xobject : document.getXObjects(classReference)) {
if (xobject != null) {
BaseProperty<?> property = (BaseProperty<?>) xobject.getField(propertyReference.getName());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment