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
First : you should create in your database the sequence like:
CREATE SEQUENCE "PRODUCT_ID_SEQ" MINVALUE 0 MAXVALUE 1000000000 INCREMENT BY 1 START WITH 1 CACHE 500 NOORDER NOCYCLE ;
and in your file Product.hbm.xml configuration make :