A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Android Security Essentials Live Lessons
this week in the
Object Relational Mapping
HSQL DB with JPA
karibasappa Guttur Chikkaveerappa
Joined: Jan 26, 2013
Feb 18, 2013 00:27:52
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)
2) @Column(name = "JOB_ID")
private long jobId;
Joined: Feb 06, 2008
Feb 19, 2013 22:08:18
Did you google on the issue? Check
I agree. Here's the link:
subject: HSQL DB with JPA
HQL Self Left Outer Join
Override id generation strategy [Spring] [Hibernate]
@Generatedvalue and MySQL
Using select strategy (id generated by oracle trigger)
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014