I believe this has something to do with the Company class. It contains a collection of type Users, like so:
When I eliminate the Company class altogether and all references to it in the User class, then the annotation for the id variable is correctly noted in the database schema:
USER_ID bigint generated by default as identity (start with 1)
This tells me there is something strange in the relationship between the Company class and the User class.
I need the Company class and I also need the User class to have a bidirectional reference back to an instance of the Company class. The way I have it setup now, however, prevents the hbm2ddl from setting the auto increment on the id field in the User class. I don't really see what is going on here. Perhaps you do?
Joined: Dec 11, 2006
Hopefully, somebody can see it already. To help the rest of us, please reduce the number of annotations to a strict minimum, perhaps using p. 184.108.40.206 of the JPA specification as a guideline.