Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Default strategy for PostgreSQL(How to define default strategy for PostgreSQL?)
Default strategy for PostgreSQL [message #842508] Thu, 12 April 2012 07:08 Go to next message
Miguel Goncalves is currently offline Miguel Goncalves
Messages: 3
Registered: April 2012
Location: Portugal
Junior Member
Hi,

How to define default strategy for PostgreSQL?
Currently i have to indicate strategy for all @GeneratedValue annotation.
I'm using PostgreSQL 9.1, EclipseLink 2.3.2.

Thanks,

Miguel Goncalves
Re: Default strategy for PostgreSQL [message #846661 is a reply to message #842508] Mon, 16 April 2012 10:53 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

If you use AUTO or just @GeneratedValue the default will be used.

I think you can customize this default by using a SessionCustomizer and calling setDefaultSequence() on the Session's login.

Otherwise you can customize your PostgreSQL platform by creating a subclass and override createPlatformDefaultSequence().


James : Wiki : Book : Blog : Twitter
Previous Topic:Default Allocation size for sequence
Next Topic:ClassDescriptor.getTable() NULL
Goto Forum:
  


Current Time: Tue Jul 29 02:49:04 EDT 2014

Powered by FUDForum. Page generated in 0.01848 seconds