天天看點

PowerDesigner生成資料庫時報錯Reflexive and mandatory reference

生成資料庫時勾選檢查模型(check model)時報Reflexive and mandatory reference錯誤。

解決方案一

如果是單純不想看到錯誤資訊在建立資料庫時取消勾選check model 選項,則在生成資料庫時便不會報錯。當然這種做法并不好。

PowerDesigner生成資料庫時報錯Reflexive and mandatory reference

解決方案二

PowerDesigner生成資料庫時報錯Reflexive and mandatory reference

我們打開這個表

PowerDesigner生成資料庫時報錯Reflexive and mandatory reference

原因:在這個表中我想讓上級目錄ID的值為臨時資料ID字段的資料,也就是給上級目錄ID外鍵連接配接到目前表的臨時資料ID。但是我給上級目錄ID設定了唯一限制。

解決辦法:取消上級目錄ID的唯一限制

PowerDesigner生成資料庫時報錯Reflexive and mandatory reference

再生成資料庫檔案就不會報該錯誤了。

相信我,這是真的