I have a sequence in the DB like this
CREATE SEQUENCE abc
INCREMENT BY 1
START WITH 1
;
I want a method like
getNextVal(); //My guess is I can fire select abc.nextval from dual
Which returns the next value from the sequence.
How should the .hbm.xml and the code for getNextVal look like. I am new to Hibernate , I tried digging up but have not been able to find a definitive answer.
Is the way of creating sequence optimal.