Spring JPA with native query and data projection mapping the wrong columns into the projected interface

前端 未结 3 2010
夕颜
夕颜 2021-02-13 16:16

I\'ve got a bit of a bizarre problem that I can\'t figure out why it\'s happening. I\'m sure I did something wrong, because this is my first time using a data projection and I\'

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-13 17:04

    Hibernate sorts the query in alphabetic order so you have to change the select to: "SELECT a.accountnumber, o.date_of_order, t.tracking_id ..." and the interface's getters should follow the same alphabetic order.

提交回复
热议问题