1,could not get next sequence value
Myeclipse生成的注解问题
@Id
@GeneratedValue(strategy = SEQUENCE, generator = "seq_sql_err")
@SequenceGenerator(name = "seq_sql_err")
@Column(name = "ID", unique = true, nullable = false, precision = 22, scale = 0)
上面是myeclipse生成的
运行时会报上面的错误,测试良久,把@SequenceGenerator(name = "seq_sql_err")改成
@SequenceGenerator(name="seq_sql_err",allocationSize=1,initialValue=1, sequenceName="seq_sql_err")就不用报错了。