List of usage examples for org.hibernate.cfg Settings isAutoCreateSchema
public boolean isAutoCreateSchema()
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; }