aspose file tools*
The moose likes Object Relational Mapping and the fly likes HSQL DB with JPA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "HSQL DB with JPA" Watch "HSQL DB with JPA" New topic
Author

HSQL DB with JPA

karibasappa Guttur Chikkaveerappa
Greenhorn

Joined: Jan 26, 2013
Posts: 11
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: 466
    
    1

Did you google on the issue? Check this one.


Vinod Tiwari | Twitter | Shikshanirman | Guftgu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HSQL DB with JPA