Hibernate @OrderBy with referenced class

前端 未结 4 891
广开言路
广开言路 2021-01-12 23:34

I have a class say: \"ClassA\" which has a collection of \"ClassB\"

@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = \"COLUMN         


        
4条回答
  •  臣服心动
    2021-01-13 00:03

    It's unfortunately impossible to do what you want. I've answered a similar question here.

    @OrderBy only supports direct properties of the collection elements.

提交回复
热议问题