What values can Hibernate hbm2ddl.auto take and what do they do?
Hello everyone! I'm new to Java and Hibernate, and I can't figure out the hbm2ddl.auto setting in the hibernate.cfg.xml file. I've seen values like create, update, validate, create-drop, and none in different projects. But the documentation is too complex for me.
Here's an example of my config:
\n<property name="hibernate.hbm2ddl.auto">update</property>\n\nI run the application, and it seems to work, but I'm afraid that when I change entities (adding a new field), the data in the database might be lost. For example, I have a User class with fields id, name, and email. If I add a phone field, what will happen to the da
No answers yet.
Log in to leave an answer