Thanks for reply!!
I also tried identity but the same problem, so what i have done is :
I have set the Idenity Specification in DB table as no & i am using
in my mapping file and its working fine.
But My problem is that one of the tables is shared between the two different applications and if i remove the identity on one will affect the other application. Though we are planning to move the other one on hibernate as well but i will have to do them together.
But in the mean time i will look for some alternatives. Please suggest some.