Reverse sort for sortedBy() [message #939654] |
Thu, 11 October 2012 00:14 |
Warwick Burrows Messages: 132 Registered: July 2009 Location: Austin, TX |
Senior Member |
|
|
Hi,
Is there a way to perform a reverse sort in an OCL query? Looking on the web the only place I found a reference to reverse OCL sorting indicated that putting a "-" in front of the sort field would work e.g. sortedBy(e|-e.name). But I get an exception:
Caused by: org.eclipse.ocl.SemanticException: Cannot find operation (-()) for the type (String)
I also tried sortedBy(-e|e.name) but got this error instead:
Caused by: org.eclipse.ocl.SyntaxException: 2:374:2:374 "::" expected instead of "|"
Is that the correct syntax? Is there another way to reverse sort?
Thanks,
Warwick
[Updated on: Thu, 11 October 2012 00:21] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03035 seconds