阅读背景:

Hibernate在使用Oracle序列时不生成标识符

来源:互联网 

I have the following mapping

我有下面的映射

@Entity
@SequenceGenerator(name="sacpSequenceGenerator", sequenceName="SACP_SEQ")
public class Sacp {

    private Integer id;


    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="sacpSequenceGenerator")
    public Integer getId() {
        return this.id;
    }

    // other setter's and getter's
}
@Entit



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: