예제 #1
0
        public override void AfterLoadLink()
        {
            base.AfterLoadLink();

            if (PrimaryKey != null)
            {
                PrimaryKey.OwnerTable    = this;
                PrimaryKey.OwnerDatabase = OwnerDatabase;
                PrimaryKey.AfterLoadLink();
            }

            foreach (var col in Columns)
            {
                col.OwnerTable    = this;
                col.OwnerDatabase = OwnerDatabase;
                col.AfterLoadLink();
            }

            foreach (var fk in ForeignKeys)
            {
                fk.OwnerTable    = this;
                fk.OwnerDatabase = OwnerDatabase;
                fk.AfterLoadLink();
            }
            foreach (var ix in Indexes)
            {
                ix.OwnerTable    = this;
                ix.OwnerDatabase = OwnerDatabase;
                ix.AfterLoadLink();
            }
            foreach (var uq in Uniques)
            {
                uq.OwnerTable    = this;
                uq.OwnerDatabase = OwnerDatabase;
                uq.AfterLoadLink();
            }
            foreach (var ch in Checks)
            {
                ch.OwnerTable    = this;
                ch.OwnerDatabase = OwnerDatabase;
                ch.AfterLoadLink();
            }
        }