title: How to solve ' Introducing FOREIGN KEY constraint 'FK' on table 'Table' may cause cycles or multiple cascade paths?
body: <p>I have a problem with migrations in EF Core 5.0 :</p>
  <blockquote>
  <p>Introducing FOREIGN KEY constraint 'FK_Trades_Signals_SignalID' on
  table 'Trades' may cause cycles or multiple cascade paths. Specify ON
  DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY
  constraints.</p>
  </blockquote>
  <p>Here is the tables:</p>
  <pre><code>public class Signal
  {
      public int SignalID { get; set; }
      public Type Type { get; set; }
      public int Buy { get; set; }
      public int Sell { get; set; }
      public int Neutral { get; set; }
      [Required]
      public int CoinID { get; set; }
      public virtual Coin Coin { get; set; }
      public int? TradeID { get; set; }
      public Trade Trade { get; set; }
  }
  
  public class Trade
  {
      public int TradeID { get; set; }
      [Required]
      public int CoinID { get; set; }
  
      public virtual Coin Coin { get; set; }
      public DateTime TradeDate { get; set; }
      [Column(TypeName = &quot;decimal(16,8)&quot;)]
      public decimal Price { get; set; }
      [Column(TypeName = &quot;decimal(16,8)&quot;)]
      public decimal Amount { get; set; }
      public TradeStatus Status { get; set; }
      [ForeignKey(&quot;Signal&quot;)]
      public int? SignalID { get; set; }
      public virtual Signal Signal { get; set; }
      [Column(TypeName = &quot;decimal(8,2)&quot;)]
      public decimal ProfitLoss { get; set; }
  }
  </code></pre>
  <p>I have tried lots of things, but continue to get errors.</p>
  <p>I tried this with the same error:</p>
  <pre><code>protected override void OnModelCreating(ModelBuilder modelBuilder)
  {
      modelBuilder.Entity&lt;Trade&gt;().HasOne&lt;Signal&gt;(s =&gt; s.Signal).WithOne(t =&gt; t.Trade).OnDelete(DeleteBehavior.NoAction);
  }
  </code></pre>
  <p>Please help.</p>