PostgresSQL JPA custom sequence

Thanks crizzis for keywords to search, but solution:

@GeneratedValue(generator="my_seq_gen")
@SequenceGenerator(name="my_seq_gen", sequenceName="user_details_userid_seq", allocationSize = 1)

where the parameter allocationSize = 1 defines your sequence-increment as 1.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top