Quote:
Is it a good practice or will performance be better if I use a SERIAL datatype as an Id?
That would depend on what database you are using. I have used Oracle, MySQL, and PostgreSQL and have never seen anything significant.
Quote:
What does Hibernate do to generate the Id? Does it do a Select MAX to get the new Id?
This all depends on what ID generator you choose along with what database you are using. There are SEVERAL ID generators available in Hibernate:
http://www.hibernate.org/hib_docs/v3/re ... aration-id
Ryan-