I have legacy Oracle db with a sequence named PRODUCT_ID_SEQ.
PRODUCT_ID_SEQ
Here is the mapping of Product class for which I need generate correct ids:<
Product
Create your sequence name in Oracle, for example, contacts_seq. In Your POJO Class . Define the following annotation for your sequence.
@Id @GeneratedValue(strategy=GenerationType.AUTO, generator="my_seq_gen") @SequenceGenerator(name="my_seq_gen", sequenceName="contacts_seq")