I have an entity that has a @OneToMany relationship that uses both FetchMode.SUBSELECT and an @OrderBy. The @OrderBy is not being used. Instead of child entities being in the order specified by the @OrderBy they appear in the order they were inserted into the database. The child entities do return in the order I expect when I use FetchMode.SELECT or FetchMode.JOIN. The child entities did return in the order I expect when I used FetchMode.SUBSELECT with Hibernate 5. Have created a testcase on GitHub that demonstrates this problem: https://github.com/s-webber/hibernate-test-case-orm-6-subselect-orderby |