Giter Club home page Giter Club logo

Comments (1)

Gunju-Ko avatar Gunju-Ko commented on August 25, 2024

hibernate hbm2ddl.auto

  • create : SessionFactory 시작시 스키마를 삭제하고 다시 생성
  • create-drop : create + SessionFactory 종료시 스키마를 삭제
  • update : SessionFactory 시작시 객체 구성과 스키마를 비교하여 컬럼 추가/삭제 작업을 진행함 (기존 스키마를 삭제하지 않고 유지)
  • validate : SessionFactory 시작시 객체구성과 스키마가 다르다면 예외 발생

참고

spring.jpa.hibernate.ddl-auto는 위의 설정 말고로 추가적으로 none을 제공하는데 none으로 설정하게 되면 자동생성 기능을 사용하지 않는다. 아래는 spring boot의 HibernateProperties 클래스 코드이다.

String ddlAuto = determineDdlAuto(existing, settings::getDdlAuto);
if (StringUtils.hasText(ddlAuto) && !"none".equals(ddlAuto)) {
    result.put(AvailableSettings.HBM2DDL_AUTO, ddlAuto);
}
else {
    result.remove(AvailableSettings.HBM2DDL_AUTO);
}
  • none : Disable DDL handling

from til.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.