Hibernate/JPA DB Schema Generation Best Practices

前端 未结 5 801
梦毁少年i
梦毁少年i 2020-11-29 01:34

I just wanted to hear the opinion of Hibernate experts about DB schema generation best practices for Hibernate/JPA based projects. Especially:

  1. What strategy

5条回答
  •  青春惊慌失措
    2020-11-29 02:13

    I believe that a lot of what is being discussed or argued here should also be related to if you are more confortable with the code-first or the database-first approach.

    Personally, I am more intended to go for latter and, making a reference to Single Responsibility Principle (SRP), I prefer having DB specialist handling the DB and an application specialist handling the application, than having the application handling the DB. Additionally, I am of the opinion that taking too many shortcuts will work fine at the beginning but create unmanageable problems as things grow/evolve.

提交回复
热议问题