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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply 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: 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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: HSQL DB with JPA
 
Similar Threads
HQL Self Left Outer Join
Override id generation strategy [Spring] [Hibernate]
@Generatedvalue and MySQL
JPA @ManyToOne
Using select strategy (id generated by oracle trigger)