Specifying distinct sequence per table in Hibernate on subclasses

前端 未结 5 758
北荒
北荒 2020-12-28 14:47

Is there a way to specify distinct sequences for each table in Hibernate, if the ID is defined on a mapped superclass?

All entities in our application extend a super

5条回答
  •  孤独总比滥情好
    2020-12-28 15:06

    IHMO there is better way to do this:

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;
    

    It works in my app.

提交回复
热议问题