Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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
@Generatedvalue and MySQL
Override id generation strategy [Spring] [Hibernate]
Using select strategy (id generated by oracle trigger)
HQL Self Left Outer Join
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013