Hibernate is not part of spring. Hibernate is the ORM framework. There is JPA and Spring Data on top of that. The *.hbm.xml files are specific to Hibernate and I have not used them before. However, it looks like you can specify those in persistentUnitPostProcessors config of the entityManagerFactory (WebAPIs DataAccessConfig.java).
<property name="persistenceUnitPostProcessors">
<list>
<bean class="org.springframework.data.jpa.support.ClasspathScanningPersistenceUnitPostProcessor">
<constructor-arg value="com.acme.domain" />
<property name="mappingFileNamePattern" value="**/*hbm.xml" />
</bean>
</list>
@Bean
public EntityManagerFactory entityManagerFactory() {
HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
vendorAdapter.setGenerateDdl(false);
vendorAdapter.setShowSql(Boolean.valueOf(this.env.getRequiredProperty("spring.jpa.show-sql")));
//hibernate.dialect is resolved based on driver
//vendorAdapter.setDatabasePlatform(hibernateDialect);
LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
factory.setJpaVendorAdapter(vendorAdapter);
factory.setPackagesToScan("org.ohdsi.webapi");
factory.setDataSource(primaryDataSource());
//something like this...
factory.setPersistenceUnitPostProcessors(...);
factory.afterPropertiesSet();
return factory.getObject();
}
http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html/ch01.html#tutorial-firstapp-mapping
I’m not sure if the mapping files will do anything for us that annotations won’t.
I also think your suspicion is correct in that PDW may not be supported at various levels (Jdbc driver, Spring Jdbc, Hibernate, etc.), which is what I meant when I assumed there would be “other issues”.
Looks like if it is necessary to support PDW, then the change to not use sequences across the board may be something to pursue (and then wire up spring batch with custom incrementers).