hibernate.hbm2ddl.auto = create.
Usually you only leave it turned on in continuous unit testing, but another run of hbm2ddl would drop everything you have stored - the create configuration setting actually translates into "drop all tables from the schema, then re-create all tables, when the SessionFactory is build ".
Can see that it is deleted and rebuilt, I do not understand is that the reconstruction, while there is clear, it appears that is not right.
We recommend you declare consistently-named identifier properties on persistent classes. We further recommend that you use a nullable (ie. non-primitive) type.
Why not to recommend our basic types of settings that? Do not know. . . . . . It seems also need to master the interpretation, especially those who read the source code. . . . . . . .
Properties need not be declared public - Hibernate can persist a property with a default, protected or private get / set pair.
This benefited from the java functions provide a powerful reflection.