Skip to main content

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

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.

Back to the top