title: EF4.1 Exception creating Database with table-per-hierarchy inheritance
body: <p>I have created a very simple project to demonstrate table-per-hierarchy inhertiance. In my unit test which tries to generate the database, i get one of a number of errors depending on the config:</p>
  
  <p>without the <code>Required()</code> method</p>
  
  <pre><code>Map&lt;InActiveUser&gt;(x =&gt; x.Requires("IsActive").HasValue(false));
  Map&lt;ActiveUser&gt;(x =&gt; x.Requires("IsActive").HasValue(true));
  </code></pre>
  
  <p>delivers:</p>
  
  <pre><code>System.Data.DataException : An exception occurred while initializing the database. See the InnerException for details.
    ----&gt; System.Data.EntityCommandCompilationException : An error occurred while preparing the command definition. See the inner exception for details.
    ----&gt; System.Data.MappingException : 
  (6,10) : error 3032: Problem in mapping fragments starting at line 6:Condition member 'User.IsActive' with a condition other than 'IsNull=False' is mapped. Either remove the condition on User.IsActive or remove it from the mapping.
  </code></pre>
  
  <p>with the <code>Required()</code> method:</p>
  
  <pre><code>Map&lt;InActiveUser&gt;(x =&gt; x.Requires("IsActive").HasValue(false).IsRequired());
  
  Map&lt;ActiveUser&gt;(x =&gt; x.Requires("IsActive").HasValue(true).IsRequired());
  </code></pre>
  
  <p>delivers:</p>
  
  <pre><code>System.Data.DataException : An exception occurred while initializing the database. See the InnerException for details.
    ----&gt; System.Data.EntityCommandCompilationException : An error occurred while preparing the command definition. See the inner exception for details.
    ----&gt; System.Data.MappingException : 
  (6,10) : error 3023: Problem in mapping fragments starting at lines 6, 13, 19:Column User.IsActive has no default value and is not nullable. A column value is required to store entity data.
  </code></pre>
  
  <p>From what I understand we should not define the discriminator column/property on the base type, but either way it seems to make no difference with or without the column defined:</p>
  
  <pre><code>  public class User
    {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public virtual int Id { get; set; }
  
      [Required]
      public virtual string Username { get; set; }
  
      [Required]
      [DefaultValue(true)]
      public bool IsActive { get; set; } //have tried without this property
    }
  
    public class InActiveUser : User
    {
      public virtual DateTime DeActivatedDate { get; set; }
    }
  
    public class ActiveUser : User
    {
    }
  </code></pre>