Saving order of a List in JPA

前端 未结 3 1399
粉色の甜心
粉色の甜心 2021-02-01 03:45

I have the following question about JPA:

Can I save the order of the elements in a java.util.List? In my application the order in which I put elements in the Lists is im

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

    You can save the order of the elements in a java.util.List. In JPA 2.0, There is the good way to save the order of element by using @OrderColumn annotation.

    For the details, you can refer this link Order Column (JPA 2.0)

提交回复
热议问题