protected virtual void AddAuditColumns(Table auditTable, IEnumerable<AuditColumn> auditColumns) { foreach (var column in auditColumns) { auditTable.AddColumn(column); if (column.IncludeInPrimaryKey) auditTable.PrimaryKey.AddColumn(column); } }
private void BindColumn(HbmColumn hbmColumn, Table table, bool isNullable) { var col = new Column {Value = value}; BindColumn(hbmColumn, col, isNullable); if (table != null) table.AddColumn(col); value.AddColumn(col); //column index BindIndex(hbmColumn.index, table, col); //column group index (although it can serve as a separate column index) BindUniqueKey(hbmColumn.uniquekey, table, col); }
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); } }
protected virtual void CopyColumns(Table dataTable, Table auditTable) { foreach (var column in dataTable.ColumnIterator) auditTable.AddColumn((Column)column.Clone()); }