public virtual void Configure(IType type, IDictionary <string, string> parms, Dialect.Dialect dialect) { IdentifierType = type; bool forceTableUse = PropertiesHelper.GetBoolean(ForceTableParam, parms, false); string sequenceName = DetermineSequenceName(parms, dialect); int initialValue = DetermineInitialValue(parms); int incrementSize = DetermineIncrementSize(parms); string optimizationStrategy = DetermineOptimizationStrategy(parms, incrementSize); incrementSize = DetermineAdjustedIncrementSize(optimizationStrategy, incrementSize); Optimizer = OptimizerFactory.BuildOptimizer( optimizationStrategy, IdentifierType.ReturnedClass, incrementSize, PropertiesHelper.GetInt32(InitialParam, parms, -1)); // Use -1 as default initial value here to signal that it's not set. if (!forceTableUse && RequiresPooledSequence(initialValue, incrementSize, Optimizer) && !dialect.SupportsPooledSequences) { // force the use of a table (overriding whatever the user configured) since the dialect // doesn't support the sequence features we need. forceTableUse = true; Log.Info("Forcing table use for sequence-style generator due to optimizer selection where db does not support pooled sequences."); } DatabaseStructure = BuildDatabaseStructure(type, parms, dialect, forceTableUse, sequenceName, initialValue, incrementSize); DatabaseStructure.Prepare(Optimizer); }