This question comes up from time to time in the Hibernate forums.
According to Gavin King, one of the men behind Hibernate, the way to do this is to map 0 to null is to write a UserType that transforms 0 to null, and use that custom UserType as the identified type. Hibernate will not create a schema with default values, so in this case, you're on your own.
Another neat Hibernate trick is to use the nullif function in HQL. It's slick:
from Clazz c where nullif(c.cat, 0) is null
If both expressions are equal, null is returned, otherwise the first expression is returned, as you would expect. This simply helps out in the coding for the null or zero values.
This was discussed by men much smarter and better looking than me in the following thread:
http://forum.hibernate.org/viewtopic.php?t=945594
I'm also maintaining a list of suggestions and ideas on the topic on my blog:
http://hibernate3tutorials.blogspot.com/2008/07/how-to-map-integer-column-value-of-0.html
Good luck!