Hi Emmanuel, all, Prior to ORM 5, we used to have OgmConfiguration (sub-class of the dreaded Configuration), which provided an entry point into our custom option API:
OgmConfiguration config = ... config.configureOptionsFor( MongoDB.class ) .associationStorage(IN_ENTITY) ... OgmSessionFactory osf = config.buildSessionFactory(); Now as of my current in-flight branch of migrating over to ORM 5, the equivalent is writing a configurator callback (which also is the only way today to do it under JPA): public class MyConfigurator extends OptionConfigurator { public void configure(Configurable configurable) { configurable.configureOptionsFor( MongoDB.class ) .associationStorage(IN_ENTITY) } } And then plugging it in like so: OgmSessionFactory osf = new MetadataSources( new StandardServiceRegistryBuilder() .applySetting( "hibernate.ogm.option.configurator", MyConfigurator.class ) .build(); ) .buildMetadata() .getSessionFactoryBuilder() .unwrap( OgmSessionFactoryBuilder.class ) .build(); Do you consider that good enough? The alternative would be providing our own OgmStandardServiceRegistryBuilder or some unwrap on StandardServiceRegistryBuilder (it has to be that early, because the datastore provider service lives in that service registry, and it may consume settings such as the global write concern which is passed to MongoDB when connecting). Personally I think what we have is good enough. Thanks, --Gunnar _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev