-1

I Need a help to change the database properties in Broadleaf to auto update when reinstall the Broadleaf.

Please give me the answer to change the database properties. Thanks in advance.

Santosh Raju
  • 156
  • 2
  • 13

1 Answers1

0

I assume you're talking about the Hibernate hbm2ddl auto settings that cause Hibernate to drop all tables, recreate the schema and populate seed data. Out-of-the-box, Broadleaf has 4 Persistence Units that you will need to configure to get the app to behave this way on startup. In your application's core property file (for example: core/src/main/resources/runtime-properties/common-shared.properties), make sure the following values are set:

blPU.hibernate.hbm2ddl.auto= create
blEventPU.hibernate.hbm2ddl.auto= create
blCMSStorage.hibernate.hbm2ddl.auto = create
blSecurePU.hibernate.hbm2ddl.auto= create
mbvcomeback
  • 176
  • 4
  • i have changed those properties to update. after i have changed to update i have created custom category called test. it was there on the database when i was restarted the whole application that custom page will gone admin application is not showing that custom page in my broadleaf admin page and client page. and it is not there on the database also. can you help me to solve the issue where the changed are effected when the page is there when i restart the application. Thanks in advance – Santosh Raju Oct 12 '17 at 07:15
  • @ewallsantosh if you use 'create' then this will drop the database on startup. it sounds like you really want to use 'update' to auto-update the schema. – phillipuniverse Nov 03 '17 at 20:46
  • @phillipuniverse this issue was solved thanks for the support – Santosh Raju Nov 06 '17 at 04:09