It's todo with the unsaved value that hibernate uses to determine whether an object is a brand new object or an existing object that has been changed.
http://www.hibernate.org/hib_docs/reference/html_single/#or-mapping-s1-4
I don't know much about hbm2java but I would speculate changing this to a value such as 0 or -1 or "any" or "none" would cause a long to be generated. Try it and see what happens.
You should read this section
http://www.hibernate.org/hib_docs/reference/html_single/#manipulating-data-s8
to make sure you understand the consequences of changing this setting.
Cheers.
Myk.