when you generate your hbm file ,your auto generated primary key is like this:
<id name="id" type="long"> <column name="ID" /> <generator class="native" /></id>