public MetadataImpl(MetadataSources metadataSources, Options options) {
Dialect dialect = metadataSources.getServiceRegistry().getService( JdbcServices.class ).getDialect();
this.serviceRegistry = metadataSources.getServiceRegistry();
this.options = options;
this.identifierGeneratorFactory = new DefaultIdentifierGeneratorFactory( dialect );
this.database = new Database( options );
this.mappingDefaults = new MappingDefaultsImpl();
final MetadataSourceProcessor[] metadataSourceProcessors;
if ( options.getMetadataSourceProcessingOrder() == MetadataSourceProcessingOrder.HBM_FIRST ) {