I have a table called Gift, which has a one-to-many relationship to a table called ClickThrough - which indicates how many times that particular Gift has been clicked. I nee
Note for anyone else that comes through here looking to order by a property/column:
When using the approaches mentioned here, no results were found. The fix was to use criteria.addOrder(Order.asc(property));
instead. Notice the difference is to use addOrder
, rather than add
;
I've had this issue several times after running here for a quick reference.