I've implemented the AbstractRoutingDataSource in order to horizontally partition my data [1]. I rely on Hibernates functionality to create and update the database schema. This works fine for the first datasource, which is resolved by the determineCurrentLookupKey() declared in AbstractRoutingDataSource.
Is there a way to apply the schema generation/update to the other datasources as well?
I've found the classes SchemaExport and SchemaUpdate respectively, that are capable of the required functionality. However, both require an instance of org.hibernate.boot.MetaData, which I don't how to obtain.
(I'm using Spring Boot in version 1.4.2.RELEASE.)
[1] https://spring.io/blog/2007/01/23/dynamic-datasource-routing/
Thanks!