@OrderColumn, @OneToMany & null index column for collection

前端 未结 5 587
梦谈多话
梦谈多话 2020-12-30 09:03

I am trying to create parent child tables where the order is preserved. The example 7.8 from Hibernate documentation shows how to do this:

@Entity
public cl         


        
5条回答
  •  萌比男神i
    2020-12-30 09:53

    Maybe these can help you:

    I have the same problem with an old version of hibernate (3.5.6) with tag @IndexColumn and find one good non-invasive workaround: try to change your List to Set Object and use HashSet instead of ArrayList. It's seems that old Hibernate versions work better with Sets.

    Good luck!

提交回复
热议问题