Let’s say we have Order and Order Lines entity relationship (composition). I would like to have a default sorting order in the table of Order Lines of product, price and quantity at the point when the datasource is loaded from the database. Let’s say i want to sort the lines by default by product names.
I tried to use @OrderBy in the collection attribute of the Order entity but it’s only limited to local attributes of the Order Line entity.
First of, my apologies for bumping this up after so long.
Just wanted to add that for this kind of sorting, you will need to have the sorting column visible. The previous option was calling the sorting field from the data source.
In my case, the sorting field I want to use is not one that I want to have visible on the table. If anyone can point out how to achieve that, I’ll appreciate. I’ll look around though.