Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
17.1.0
-
None
-
Unknown
-
Description
It's currently not possible using CollectionTool to performing ordering of xobjects based on their attributes, because the Object API only gives a #get() method and CollectionTool is looking for a getter with the attribute name. So we end up with error like that:
2025-03-27 15:26:19,310 [qtp1601292138-142 - http://localhost:8080/xwiki/bin/get/Main/WebHome?xpage=xpart&vm=commentsinline.vm] ERROR o.x.v.t.CollectionTool - exception encountered while sorting: Could not retrieve comparable value for 'date' from com.xpn.xwiki.api.Object@32406bb1: java.lang.NoSuchMethodException: Unknown property 'date' on class 'class com.xpn.xwiki.api.Object'
It would be handy to improve it to allow retrieve values from those #get() methods for sorting comparison.