Hello Rave devs, I came across a bug related to the shared spaces code that I'm
not quite sure how to best solve. It involves the render order of the
sub-pages (for example on the Person Profile page). On occasion I've noticed
that the sub page tabs were not rendering in their proper order, even though I
verified that the PageUser#renderSequence values were correct in the database.
The issue is that the Page#subPages list no longer has an OrderBy annotation,
which leaves the ordering of the data up to the database (hence the occasional
inconsistency).
So, in theory, we need to put an OrderBy annotation back on the Page#subPages
list - something along the lines of @OrderBy("members.renderSequence").
However, there is a limitation in JPA where you can't order a list based on
properties of entities in a sublist (in this case trying to order on
renderSequence of List<PageUser> members).
What do you think the best approach would be to ensure the subPages are
returned in their proper order? One solution would be to manually sort the
subPages List in the Page#getSubPages() getter method, but that would not be
the most efficient. Any better ideas?
Thanks, Tony