0

I am running into some serious issues with hibernate. It is dropping! my tables. Digging through the logs I find these two lines of code

    Hibernate: drop table if exists REFERENCES
    Hibernate: drop table if exists ACCOUNTS

Now whatever might be the difference in entity specifications, I would expect Hibernate NOT to drop my table. Besides this, in my experience I have found that it is RANDOMLY dropping data and altering it inside database as well.

Now this obviously [as apparent] a serious issue. How do I prevent hibernate from altering my SQL schema? Id rather have it throw fatal exceptions than screw up my database!

Kara
  • 5,996
  • 16
  • 49
  • 56
Ace
  • 1,441
  • 2
  • 29
  • 45

1 Answers1

0

I think changing the spring.jpa.hibernate.ddl-auto property would solve your problem.

Setting it to validate or update would work as you want it to from what I can understand.

Check out this answer for more information.

sugar.king
  • 26
  • 1
  • 4