ORA-02289: sequence does not exist when upgrade Hibernate 3 to hibernate 4

前端 未结 2 1406
滥情空心
滥情空心 2021-01-12 15:13

I have an issue related to sequence not found when I upgrade hibernate from 3.5 to 4.0.0.RC6:

at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:         


        
相关标签:
2条回答
  • 2021-01-12 15:36

    Even i got the same issue, Use the following lines

    @GenericGenerator(name = "increment", strategy = "increment")
    @GeneratedValue(generator = "increment")
    
    0 讨论(0)
  • 2021-01-12 16:00

    I found the answer.

    For common id generator for all classes, we should use

    @Id
    @GeneratedValue(generator="GENERATOR_COMMON")
    @GenericGenerator(name="GENERATOR_COMMON",strategy="point.to.table.generator")
    

    Hope this help someone who have the same issue like me.

    0 讨论(0)
提交回复
热议问题