public void PrepareTemporaryTables(IMapping mapping, Dialect.Dialect dialect) { if (dialect.SupportsTemporaryTables) { temporaryIdTableName = dialect.GenerateTemporaryTableName(Table.Name); Table table = new Table(); table.Name = temporaryIdTableName; foreach (Column column in Table.PrimaryKey.ColumnIterator) { table.AddColumn((Column)column.Clone()); } temporaryIdTableDDL = table.SqlTemporaryTableCreateString(dialect, mapping); } }