Let\'s say I have two tables, Books and Reviews. Reviews has a column, stars, that can have a value between 1 and 5. A Book can have many Reviews.
How would I select al
You could always set the ordering asc/desc and then limit the results.
ex:
criteria.addOrder(Order.desc("id")); criteria.setMaxResults(1);
Not sure where it stands with regard to efficiency. I'm assuming that it's doing the filtering after the fact that a Select * has been fired off?
Select *