提问人:mcfly soft 提问时间:4/7/2021 最后编辑:mcfly soft 更新时间:4/7/2021 访问量:309
ORA-02201:Hibernate @SequenceGenerator不允许使用序列
ORA-02201: sequence not allowed here with Hibernate @SequenceGenerator
问:
我收到以下错误:
error performing isolated work; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: error performing isolated work
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:259)
...
...
Caused by: org.hibernate.exception.SQLGrammarException: error performing isolated work
...
...
Caused by: java.sql.SQLSyntaxErrorException: ORA-02201: sequence not allowed here
我有一个这样的实体:
@Entity
@Data
@Table(name = "mytable", schema = "myschema")
@NoArgsConstructor
@AllArgsConstructor
@SequenceGenerator(name="mygenerator", sequenceName = "myschema.myseq",allocationSize = 1)
public class MYENTITY {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "mygenerator")
private Long id;
}
序列“myseq”存在。
任何线索,为什么我得到错误?
Hibernate方言: spring.jpa.properties.hibernate.dialect=com.asb.anna.web.repository.Oracle12cDialectBugfixImpl
答: 暂无答案
评论
ORA-
error 表示 Oracle,它也被标记为 @crizzis