Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hi, i am a new hibernate fan and just started learning hibernate. i got a question regarding very basic things:
I m trying to understand Configuration.setProperty(String, String) method,
and came across the class Environment.HBM2DDL_AUTO. now its value has 3 options: "create" "update" "create-drop" what does each mean and do?
i think if passing value "create" it asks program to create schema according to mapping config files everytime the program runs, is this true?
also, how exactly does HQL autocreates tables instead of SQL on-the-fly? i was told that i need to drop all tables (with duplicate names) before running hibernate code, cuz hibernate uses HQL to create tables according to mapping files? then for example i have a main.java file which uses hibernate, i think it is wrong to think that main.java re-creates schema everytime it is executed. but how should i understand this?
thanks for help!