Hi,
Working with multiple factories should be fine, I suppose you'll have the burden of maintaining different (XML) mappings, though.
Hibernate ORM defines different means of multi-tenancy (see
http://docs.jboss.org/hibernate/orm/5.1 ... ultitenacy) which essentially let you use the same mappings with a different database or schema per tenant.
I don't think that these options are supported yet in OGM, though. Could you try it out (probably you'd run into some JDBC-specific code paths) out and report back by creating a feature request in the OGM tracker (
https://hibernate.atlassian.net/browse/OGM)?
It'll be an interesting exercise, as we currently work with a single DatastoreProvider instance (per session factory), whereas it would have to be one per tenant now.
Thanks,
--Gunnar