Configuration conf = new Configuration();
conf.setEnvironment(new Environment("production", createTransactionFactory(), database.getDataSource()));
conf.setUseGeneratedKeys(true);
conf.setLazyLoadingEnabled(false);
conf.setJdbcTypeForNull(JdbcType.NULL);
Dialect dialect = database.getDialect();
conf.setDatabaseId(dialect.getId());
conf.getVariables().setProperty("_true", dialect.getTrueSqlValue());
conf.getVariables().setProperty("_false", dialect.getFalseSqlValue());
conf.getVariables().setProperty("_scrollFetchSize", String.valueOf(dialect.getScrollDefaultFetchSize()));
loadAlias(conf, "ActiveDashboard", ActiveDashboardDto.class);
loadAlias(conf, "Author", AuthorDto.class);
loadAlias(conf, "Component", ComponentDto.class);
loadAlias(conf, "Dashboard", DashboardDto.class);