Esempio n. 1
0
        private IForeignKeyColumnInfo[] GetColumnInfoFromConfig(cfg.db2hbmconfTableForeignkey fk, ITableMetadata metaData)
        {
            List <IForeignKeyColumnInfo> fks = new List <IForeignKeyColumnInfo>();

            foreach (var ci in fk.columnref)
            {
                fks.Add(new ConfiguredForeignKeyColumnInfo(ci, fk, metaData));
            }
            return(fks.ToArray());
        }
Esempio n. 2
0
            public ConfiguredForeignKeyColumnInfo(cfg.db2hbmconfTableForeignkeyColumnref cref, cfg.db2hbmconfTableForeignkey fk, ITableMetadata metaData)
            {
                PrimaryKeyTableName    = fk.foreigntable;
                PrimaryKeyTableCatalog = fk.foreigncatalog;
                PrimaryKeyTableSchema  = fk.foreignschema;
                PrimaryKeyColumnName   = cref.foreigncolumn;

                ForeignKeyColumnName   = cref.localcolumn;
                ForeignKeyTableCatalog = metaData.Catalog;
                ForeignKeyTableSchema  = metaData.Schema;
                ForeignKeyTableName    = metaData.Name;
            }