示例#1
0
        private void Initialize()
        {
            if (wasInitialized)
            {
                return;
            }

            string autoKeyWordsImport = PropertiesHelper.GetString(Environment.Hbm2ddlKeyWords, configuration.Properties, "not-defined");

            if (autoKeyWordsImport == Hbm2DDLKeyWords.AutoQuote)
            {
                SchemaMetadataUpdater.Update(configuration, dialect);
                SchemaMetadataUpdater.QuoteTableAndColumns(configuration, dialect);
            }

            wasInitialized = true;
        }
示例#2
0
        private void Initialize()
        {
            if (wasInitialized)
            {
                return;
            }
            dialect = Dialect.Dialect.GetDialect(configProperties);

            string autoKeyWordsImport = PropertiesHelper.GetString(Environment.Hbm2ddlKeyWords, configProperties, "not-defined");

            if (autoKeyWordsImport == Hbm2DDLKeyWords.AutoQuote)
            {
                SchemaMetadataUpdater.Update(cfg, dialect);
                SchemaMetadataUpdater.QuoteTableAndColumns(cfg, dialect);
            }

            dropSQL        = cfg.GenerateDropSchemaScript(dialect);
            createSQL      = cfg.GenerateSchemaCreationScript(dialect);
            formatter      = (PropertiesHelper.GetBoolean(Environment.FormatSql, configProperties, true) ? FormatStyle.Ddl : FormatStyle.None).Formatter;
            wasInitialized = true;
        }