Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HSQL DB with JPA

 
karibasappa Guttur Chikkaveerappa
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have one reqt in my project.

We are using in memory HSQL DB. for non primary column i want to generate a sequence , if anyone knows please reply me soon.

I treied the following ways but seq generated was always zero for all records.

1) @GeneratedValue(strategy=GenerationType.SEQUENCE,generator = "myGen")
@SequenceGenerator(name = "myGen", initialValue=1,allocationSize=100)
@Column(name="JOB_ID")

2) @Column(name = "JOB_ID")
@GeneratedValue(strategy=GenerationType.IDENTITY)
private long jobId;
 
Vinod Tiwari
Ranch Hand
Posts: 466
1
IntelliJ IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you google on the issue? Check this one.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic