title: EF 4.4 InverseProperty does not quite inverse
body: <p>This might really be something obvious but I'm not sure why my InverseProperty annotation does not work the other way.</p>
  
  <p>I have this 2 classes (simplified):</p>
  
  <pre><code>public class Cluster
  {
      [Key]
      public int ClusterId { get; set; }
  
      [Required]
      [MaxLength(80, ErrorMessage = "DimensionCluster Name cannot be more than 80 characters in length.")]
      [Display(Name = "DimensionCluster Name")]
      public string ClusterName { get; set; }
  
      [InverseProperty("DimensionCluster")]
      public virtual IEnumerable&lt;Dimension&gt; Dimensions { get; set; }
  
  }
  
  public class Dimension
  {
      [Key]
      public int DimensionId { get; set; }
  
      [Required]
      [MaxLength(80, ErrorMessage = "Dimension Name cannot be more than 80 characters in length.")]
      [Display(Name = "Dimension Name")]
      public string DimensionName { get; set; }
  
      [Required]
      [Display(Name = "Short Definition")]
      public string ShortDefinition { get; set; }
  
      [Required]
      [Display(Name = "DimensionCluster Name")]
      public int ClusterId { get; set; }
  
      [ForeignKey("ClusterId")]
      public virtual Cluster DimensionCluster { get; set; }
  
  
  }
  </code></pre>
  
  <p>The InverseProperty annotation above does not work. I get:</p>
  
  <blockquote>
    <p>The InversePropertyAttribute on property 'Dimensions' on type
    'PDguide.Models.Cluster' is not valid. The property 'DimensionCluster'
    is not a valid navigation property on the related type
    'System.Collections.Generic.IEnumerable`1[PDguide.Models.Dimension]'.
    Ensure that the property exists and is a valid reference or collection
    navigation property.</p>
  </blockquote>
  
  <p>Tried a lot of MSDN documents and SO answers. And I finally tried it the other way (code below), and it worked!</p>
  
  <pre><code>public class Cluster
  {
      [Key]
      public int ClusterId { get; set; }
  
      [Required]
      [MaxLength(80, ErrorMessage = "DimensionCluster Name cannot be more than 80 characters in length.")]
      [Display(Name = "DimensionCluster Name")]
      public string ClusterName { get; set; }
  
      public virtual IEnumerable&lt;Dimension&gt; Dimensions { get; set; }
  
  }
  
  public class Dimension
  {
      [Key]
      public int DimensionId { get; set; }
  
      [Required]
      [MaxLength(80, ErrorMessage = "Dimension Name cannot be more than 80 characters in length.")]
      [Display(Name = "Dimension Name")]
      public string DimensionName { get; set; }
  
      [Required]
      [Display(Name = "Short Definition")]
      public string ShortDefinition { get; set; }
  
      [Required]
      [Display(Name = "DimensionCluster Name")]
      public int ClusterId { get; set; }
  
      [ForeignKey("ClusterId")]
      [InverseProperty("Dimensions")]
      public virtual Cluster DimensionCluster { get; set; }
  
  }
  </code></pre>
  
  <p>I have read somewhere (I could not find that reference now, or I may have inferred it incorrectly) that you can specify the InverserProperty annotation on either end of the relationship. But that does not seem to be the case here? </p>
  
  <p>Am I right in my understanding that InverseProperty should work with either property? </p>