title: HasForeignKey relationship through a Complex Type property
body: <p>I have two complex types:</p>
  
  <pre><code>public class ProductItemIdentifier
  {
      public Guid Product_Id { get; set; }
      public string ItemName { get; set; }
  }
  
  public class AuctionItemIdentifier
  {
      public Guid Auction_Id { get; set; }
      public string ItemName { get; set; }
  }
  </code></pre>
  
  <p>I have a entity type:</p>
  
  <pre><code>public class Comment
  {
      public Guid Id { get; set; }
      public string Comment { get; set; }
  
      public ProductItemIdentifier ProductItem { get; set; }
      public AuctionItemIdentifier AuctionItem { get; set; }
  
      #region Navigation
  
      public virtual Product Product { get; protected set; }
      public virtual Auction Auction { get; protected set; }
  
      #endregion
  }
  </code></pre>
  
  <p>And here is the <code>Configuration</code></p>
  
  <pre><code>public class CommentConfiguration : EntityTypeConfiguration&lt;Comment&gt;
  {
      HasKey(p =&gt; p.Id);
  
      HasOptional(p =&gt; p.Product).WithMany().HasForeignKey(p =&gt; p.ProductItem.Product_Id).WillCascadeOnDelete(false);
      HasOptional(p =&gt; p.Auction).WithMany().HasForeignKey(p =&gt; new { p.AuctionItem.Auction_Id }).WillCascadeOnDelete(false);
  }
  </code></pre>
  
  <p>Basically i am trying to create a foreign key through a Complex Type property (and doesn't work).</p>
  
  <p>The error i get is:</p>
  
  <pre><code>The properties expression 'p =&gt; p.ProductItem.Product_Id' is not valid. The expression should represent a property: C#: 't =&gt; t.MyProperty'  VB.Net: 'Function(t) t.MyProperty'. When specifying multiple properties use an anonymous type: C#: 't =&gt; new { t.MyProperty1, t.MyProperty2 }'  VB.Net: 'Function(t) New With { t.MyProperty1, t.MyProperty2 }'.
  </code></pre>
  
  <p>Is there any way to create the relationship <em>without</em> adding the Foreign Key columns to the <code>Comment</code> entity directly?</p>