title: Map property using OwnsOne method in EF Core 2.0
body: <p>I'm trying to migrate EF 6 project to EF Core 2.0. 
  I would like to streess out that I am not allowed to change anything in database structure - must be exactly the same as for EF 6 project.</p>
  
  <p>I have the foloowing entities:</p>
  
  <pre><code>abstract class Vehicle { ... }
  
  abstract class Car : Vehicle 
  { 
      public Dimension Dimensions { get; set; } 
  }
  
  class Audi : Car { ... }
  
  class Mazda : Car { ... }
  
  class Dimension
  {
      public double Width { get; set; }
      public double Height { get; set; }
  }
  </code></pre>
  
  <p>Table mappings as follows:</p>
  
  <pre><code>public VehicleMap(EntityTypeBuilder&lt;Vehicle&gt; entityBuilder)
  {
      entityBuilder.ToTable("Vehicles");
      entityBuilder.HasKey(_ =&gt; _.Id);
      entityBuilder.HasDiscriminator&lt;string&gt;("Type").HasValue&lt;Truck&gt;(nameof(Truck));
  }
  
  public CarMap(EntityTypeBuilder&lt;Car&gt; entityBuilder)
  {
      entityBuilder.HasDiscriminator&lt;string&gt;("Type")
          .HasValue&lt;Mazda&gt;(nameof(Mazda))
          .HasValue&lt;Audi&gt;(nameof(Audi));
  
      **entityBuilder.OwnsOne(_ =&gt; _.Dimensions);**
  }
  </code></pre>
  
  <p>The problem I have is about <code>Dimensions</code> property defined in <code>Car</code> abstract class. I would like to map it using <code>OwnsOne</code> method to have all its class properties defined in the same table.</p>
  
  <p>I'm getting the following error: </p>
  
  <blockquote>
    <p>Cannot use table 'Vehicles' for entity type 'Car.Dimensions#Dimension'
    since it has a relationship to a derived entity type 'Car'. Either
    point the relationship to the base type 'Vehicle' or map
    'Car.Dimensions#Dimension' to a different table.</p>
  </blockquote>
  
  <p>Any idea how to solve it in EF Core 2.0?</p>