Okay, back home now..
The guide I used:
http://www.java-entrepreneur.com/502267 ... no_xml.phpWhen I click the image or the link below it, I get an empty popup, so if there is some more things needed that have been cut off, that might explain my problem, I guess?
The code I have to set up hibernate:
Code:
Properties props = new Properties();
props.put("hibernate.dialect", "org.hibernate.dialect.MySQLDialect");
props.put("hibernate.connection.driver_class", "com.mysql.jdbc.Driver");
props.put("hibernate.connection.url", config.getConfigValueAsString("database.url"));
props.put("hibernate.connection.username", config.getConfigValueAsString("database.username"));
props.put("hibernate.connection.password", config.getConfigValueAsString("database.password"));
props.put("hibernate.connection.pool_size", "1");
props.put("hibernate.hbm2ddl.auto", "create");
props.put("hibernate.show_sql", "false");
props.put("hibernate.jdbc.use_streams_for_binary", "true");
props.put("hibernate.use_outer_join", "false");
props.put("hibernate.jdbc.batch_size", "0");
props.put("hibernate.jdbc.use_scrollable_resultset", "true");
props.put("hibernate.statement_cache.size", "0");
hibernateConfig = new Configuration().setProperties(props);
for (Class modelType : typeProvider.getModelClasses())
{
hibernateConfig.addClass(modelType);
}
ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().applySettings(hibernateConfig.getProperties()).buildServiceRegistry();
sessionFactory = hibernateConfig.buildSessionFactory(serviceRegistry);
The specific implementation of getModelClasses that gets called in that loop is this:
Code:
@SuppressWarnings("rawtypes")
@Override
public Class[] getModelClasses()
{
return new Class[] { InventoryStorage.class };
}