Defining the order of a list

后端 未结 5 1582
醉酒成梦
醉酒成梦 2020-12-11 16:32

I have the following problem. I have three classes, A, B and C. A contains a OneToMany relationed list of B:s. B contains a ManyToOne relation to C. C contains a field calle

5条回答
  •  盖世英雄少女心
    2020-12-11 17:00

    It's NOT possible. @OrderBy only accepts direct property / field names, not nested properties. Which makes sense, really, because "c" table - depending on your fetching strategy may not even be part of a select issued to retrieve your "b"s.

提交回复
热议问题