title: WebAPI AND Odata V4 issue: ComplexType containing Entities
body: <p>I am getting following error while adding relationship inside the complex type. How can I fix this issue. I binged and read that it was issue with OData V3 but not in OData V4. </p>
  
  <p>The complex type 'Microsoft.OneIM.ActiveIncident.Contracts.IncidentImpact' refers to the entity type 'Microsoft.OneIM.ActiveIncident.Contracts.ImpactedService' through the property 'ImpactedServices'.</p>
  
  <p>at System.Web.OData.Builder.ODataConventionModelBuilder.MapComplexType(ComplexTypeConfiguration complexType)
     at System.Web.OData.Builder.ODataConventionModelBuilder.MapType(StructuralTypeConfiguration edmType)
     at System.Web.OData.Builder.ODataConventionModelBuilder.AddComplexType(Type type)
     at System.Web.OData.Builder.ODataConventionModelBuilder.ReconfigureEntityTypesAsComplexType(EntityTypeConfiguration[] misconfiguredEntityTypes)
     at System.Web.OData.Builder.ODataConventionModelBuilder.RediscoverComplexTypes()
     at System.Web.OData.Builder.ODataConventionModelBuilder.GetEdmModel()
     at Microsoft.OneIM.ActiveIncident.Service.ModelBuilder.BuildIncidentModels() in c:\OneIM\EngSys\OneIM\ActiveIncident\src\Product\Service\Models\ModelBuilder.cs:line 42
     at Microsoft.OneIM.ActiveIncident.Service.WebApiConfig.Register(HttpConfiguration config) in c:\OneIM\EngSys\OneIM\ActiveIncident\src\Product\Service\App_Start\WebApiConfig.cs:line 22
     at Microsoft.OneIM.ActiveIncident.ServiceHost.ApiStartup.Configuration(IAppBuilder appBuilder) in c:\OneIM\EngSys\OneIM\ActiveIncident\src\Product\ServiceHost\ApiStartup.cs:line 27</p>
  
  <p>My model looks as below</p>
  
  <pre><code>    public class Incident
      {
              public IncidentImpact Impact { get; set; }
      }
  
  [ComplexType]
  public class IncidentImpact
  {
  
      public bool IsCustomerImpacting { get; set; }
  
      public string SupportTicketId { get; set; }
  
      public ICollection&lt;ImpactedService&gt; ImpactedServices { get; set; }
  }
  
  
  public class ImpactedService
  {
  
       public long Id { get; set; }
  
  
        public long IncidentId { get; set; }
  
      public Incident Incident { get; set; }
  
      public long ServiceId { get; set; }
  }
  </code></pre>