| Author |
HSQL DB with JPA
|
karibasappa Guttur Chikkaveerappa
Greenhorn
Joined: Jan 26, 2013
Posts: 9
|
|
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
Joined: Feb 06, 2008
Posts: 458
|
|
|
Did you google on the issue? Check this one.
|
Vinod Tiwari | Twitter
|
 |
 |
|
|
subject: HSQL DB with JPA
|
|
|