Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Sequence in Postgresql

      as far as I know, there is not much difference in the way Sequences work in postgresql and Oracle; and hence eclipselink works the same way on both the  
      database systems.


On Sun, Feb 7, 2010 at 2:34 PM, Tan-Vinh Nguyen <cinhtau@xxxxxxxxxxxxxx> wrote:
Hello everybody,

I'm a great fan of Postgresql. I started to evaluate the use of
EclipseLink with Postgresql. I read at following introduction


"SEQUENCE – specify that EclipseLink persistence provider use a database
sequence (see @SequenceGenerator).

Note:SEQUENCE strategy is only supported on Oracle Database."

I was curious so I tried it with Postgresql Sequences and it works

@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="PARTNER_SEQ")
@SequenceGenerator(name="PARTNER_SEQ", sequenceName="partners_id_seq",
private Long id;

I'm wrong or is this introduction out of date and needs an update? Any
comments for clarification are appreciated.

Thanks in advance.
eclipselink-users mailing list

Back to the top