I think there is a bug logged about negative ids, you could search for and
vote for it.
You would be best using an Integer id instead of int, the issue is that
the generator needs to know if to generate a new id or not, normally this
is done for null, but for int there is not null,
so 0 is assumed to be uninitialized, some people also use -1 or negative
numbers for uninitialized, so these are assumed to mean null as well, as
the generator will never generate a negative number.