This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When the Persistence Provider is Hibernate and the Table Generation Stragegy is "Create", the "hibernate.hbm2ddl.auto" property value should be "update". It's currently set to "create", which causes the table to be re-created everytime the application is deployed. "update" will property create the table if it does not exist.
The sugested solution seems like hack for me. User might want to set create, not update. IMHO better solution is to add new property for update option and show this option in the PU dialogs (the wizards for DS/JDBC and the visual editor). The question is whether there should be this option shown for each persistence provider (disabled if it is not supported) or whether we should show only those options which are supported. It involves a UI change, could someone from HIE comment?
I disagree. It's just semantics. Hibernate uses the property value "create" for our UI option, "Drop and Create". Hibernate used the property value "update" for the UI option "Create". UI ==> Hibernate mapping property value Create ==> "update" Drop and Create ==> "create" None ==> "" What other UI option would you add?
http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html ...here I found that create/update/create-drop are all legal values with a slightly different meaning. But I am ok with the change if you think that "update" is more likely what the users want to get from the wizard/editor than "create".
Fixed. Checking in HibernateProvider.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/provider/Attic/HibernateProvider.java,v <-- HibernateProvider.java new revision: 1.1.2.7; previous revision: 1.1.2.6 done