on 05-29-2018 1:02 PM
Previously reported a problem with objectsUpdated not present in Hybris 6.3 (Expert Q Here) , now objectUpdated is removed completely and only objectsUpdated is left. This seems to be working in most cases but when using a MultiReference editor and editing the contained items in the popup dialog ("Edit details") then the objects in the model for the base object is not updated.
This is caused by the Objects.equals(currenctObject, updatedObject) but since updatedObject is passed as a collection now, this will ALWAYS be false.
public class PyReferenceModelProperties extends DefaultReferenceModelProperties {
@Override
public void updateReferenceProperties(Set<String> referenceProperties, Object updatedObject, ObjectNotFoundExceptionHandler exceptionHandler) {
if (updatedObject instanceof Collection) {
final Collection<Object> updatedObjects = (Collection<Object>) updatedObject;
updatedObjects.forEach(object -> super.updateReferenceProperties(referenceProperties, object, exceptionHandler));
} else {
super.updateReferenceProperties(referenceProperties, updatedObject, exceptionHandler);
}
}
}
We solved this by replacing the bean for referenceModelProperties with the above class. Please also fix for next hybris release.
Hi,
I will report that as a critical issue for the next release. Thank you for the detailed explanation and the fix 🙂
Cheers, Wojtek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It was already fixed and will be released with 1808.
Cheers, Jacek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.