0

I want to implement a simple application Hibernate forward engineering concept. Where If I make any changes to Hibernate Entities then Hibernate should automatically make specific changes to the database columns.

For example:

If I add a new field in Hibernate Entity (POJO), then a new column should be added to the DB table. (This should happen when I restart tomcat).

Is this possible?

Matt
  • 14,906
  • 27
  • 99
  • 149
vissu
  • 1,921
  • 7
  • 37
  • 52

1 Answers1

1

You can do this using hibernate configuration property hibernate.hbm2ddl.auto. set this property value to update to reflect changes from POJO to database. Refer this link for more information.

Community
  • 1
  • 1
ypp
  • 144
  • 2
  • 8