Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Shubham Aggarwal
800 PointsWhat other values can be used for property "hbm2ddl.auto" in hibernate.cfg.xml?
What about other values for "hbm2ddl.auto" property in hibernate.cfg.xml file?
1 Answer
Shubham Aggarwal
800 PointsAdding the answer myself.
Property hbm2ddl.auto can have other values like create, create-drop and update.
Though course shows use of create value, I prefer the update value instead. What happens with create is, whenever you run the application, database is dropped and again made and so, deleting all the previous data present in it. WIth update value, Hibernate first checks if the database already exists. If it does, it will just update it with any new columns you might have added later, without deleting the previous added data.