0
我這裏有2個實體創建2個相同的外鍵
讓利說
飛行 flight_id - PK 起源 - FK1 目的地 - FK2
國家 COUNTRY_ID - PK 國家 代碼
樣本代碼 類別F1 ight { public int ID {get;組; }
[BelongsTo(Column = "Origin", ForeignKey = "country_id")]
public Countries Origin {get; set;}
[BelongsTo(Column = "destination", ForeignKey = "country_id")]
public Countries Destination {get; set; }
}
創建於ActiveRecord的架構時,我得到一個錯誤。什麼可以替代這個?謝謝!