klcodanr commented on a change in pull request #46: SlingModelPersistor: 
Improvements for compatibility and additional Ignore features, several bug fixes
URL: https://github.com/apache/sling-whiteboard/pull/46#discussion_r330154408
 
 

 ##########
 File path: 
SlingModelPersist/src/main/java/org/apache/sling/models/persistor/impl/ModelPersistorImpl.java
 ##########
 @@ -129,8 +130,8 @@ public void persist(final @NotNull String nodePath, final 
@NotNull Object instan
             } else {
                 Resource r = resource;
                 fields.stream()
-                        .filter(ReflectionUtils::isNotTransient)
-                        .filter(ReflectionUtils::isSupportedType)
+                        .filter(field -> ReflectionUtils.isNotTransient(field, 
isUpdate))
+                        .filter(field -> 
ReflectionUtils.isSupportedType(field) || 
ReflectionUtils.isCollectionOfPrimitiveType(field))
 
 Review comment:
   It would seem like a good idea to have some logging as to why a field is not 
being persisted. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to