This is a simply one – how can I make my DB (I am using Derby) to commit the changes in entity(I mean changing the column name, constraints, etc)? Because I’ve discovered when I change something in entity atributes, my DB still remains the same. I am also using Netbeans if there is any functionality for this.
I am now aware of hibernate.hbm2ddl.auto, but I am looking for something similar(e.g. I don’t want to drop date during structure changes from entity to DB)
You didn’t specify your persistence provider, but I’ll assume hibernate; you can use the
hibernate.hbm2ddl.autoconfiguration parameter to tell hibernate to recreate the tables. See this SO question for more details. Note that you should not use this in production; see this SO question for those details.