A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Object Relational Mapping
Auto ID generation strategy in JPA
Joined: Mar 29, 2011
Nov 28, 2011 11:21:33
If we specify id generation strategy as AUTO, the persistence provider chooses one of the following strategies :-
My question is on what basis or criteria does the persistence provider decides which strategy to be used?
Joined: Oct 01, 2007
Nov 29, 2011 06:26:25
This depends on the provider.
By default EclipseLink uses TABLE sequencing. This is because IDENTITY and SEQUENCE require database support, so TABLE is the most platform independent.
Blog:Java Persistence Performance
I agree. Here's the link:
subject: Auto ID generation strategy in JPA
Primary Key Autogeneration for InheritenceType. TABLE_PER_CLASS
Question on Id Generation Strategies
sequence generator with mysql
Assigned id generator and Save Method
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014