HiLo generator strategy not working

后端 未结 7 490
伪装坚强ぢ
伪装坚强ぢ 2021-02-04 09:02

I am new to hibernate. What I am trying to do is use @CollectionIdto generate an identifier for my Address class. I have used Collection interface for

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-04 09:29

    You must choose from one of the Hi/Lo strategy :

    • SequenceHiLoGenerator : to back the Hi with a Sequence
    • MultipleHiLoPerTableGenerator : to back the Hi with a Table

    To be as close as your tutorial as possible, I would simply change "hilo" to "seqhilo" in your code.

提交回复
热议问题