title: "The owned entity type requires to be referenced from another entity type via a navigation"
body: <p>I have an entity in my application called Person. There are two types of users, Student and Professor, that inherit from Person.</p>
  
  <p>Every Person has a settings property:</p>
  
  <pre><code>public abstract class Person
  {
      public Guid UserId { get; set; }
      public string Name { get; set; }
  
      public PersonSettings Settings { get; set; }
  }
  
  public class Student : Person
  {
  }
  
  public class Professor : Person
  {
  }
  </code></pre>
  
  <p>My PersonSettings class is just a couple of properties. It isn't an entity to be stored in the database, so I marked it as Owned:</p>
  
  <pre><code>[Owned]
  public class PersonSettings
  {
      public bool NotificationsEnabled { get; set; }
      public int GymPassId { get; set; }
  }
  </code></pre>
  
  <p>These are stored in the database as json, which I'm using EF Core conversion values in my Person entity configuration to serialize and deserialize it:</p>
  
  <pre><code>builder.Property(p =&gt; p.Settings).HasConversion(
      s =&gt; JsonConvert.SerializeObject(s, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }),
      s =&gt; JsonConvert.DeserializeObject&lt;PersonSettings&gt;(s, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }));
  </code></pre>
  
  <p>But when I try to run my application and do a database migration, I'm getting an error saying</p>
  
  <blockquote>
    <p>The owned entity type 'PersonSettings' requires to be referenced from another entity type via a navigation. Add a navigation to an entity type that points at 'PersonSettings'.</p>
  </blockquote>
  
  <p>What am I supposed to do here? I couldn't find anything on the error message. Not sure if it has anything to do with Person being an abstract class.</p>