Example usage for org.hibernate.cfg Settings isAutoCreateSchema

List of usage examples for org.hibernate.cfg Settings isAutoCreateSchema

Introduction

In this page you can find the example usage for org.hibernate.cfg Settings isAutoCreateSchema.

Prototype

public boolean isAutoCreateSchema() 

Source Link

Usage

From source file:fr.univrouen.poste.web.admin.IndexController.java

License:Apache License

private String getHbm2ddlAuto() {
    Session session = entityManager.unwrap(Session.class);
    SessionFactoryImpl sessionImpl = (SessionFactoryImpl) session.getSessionFactory();
    Settings setting = sessionImpl.getSettings();
    String hbm2ddlAuto = setting.isAutoCreateSchema() ? "create" : "update";
    return hbm2ddlAuto;
}