title: Hibernate @DiscriminatorColumn and @DiscriminatorValue issue
body: <p>I have this parent class: </p>
  
  <pre><code>@Entity
  @Inheritance(strategy = InheritanceType.JOINED)
  @Table(name = "BSEntity")
  @DiscriminatorColumn(name = "resourceType", discriminatorType = DiscriminatorType.STRING, length = 32)
  public abstract class BaseEntity {
  </code></pre>
  
  <p>and the subclass</p>
  
  <pre><code>@Entity
  @Table(name = "BSCategory")
  @DiscriminatorValue("Category")
  public class CategoryEntity extends BaseEntity {
  </code></pre>
  
  <p>But when I run the program, I get the following error:</p>
  
  <pre><code>2010-06-03 10:13:54,222 [main] WARN  (org.hibernate.util.JDBCExceptionReporter:100) - SQL Error: 1364, SQLState: HY000
  2010-06-03 10:13:54,222 [main] ERROR (org.hibernate.util.JDBCExceptionReporter:101) - Field 'resourceType' doesn't have a default value
  </code></pre>
  
  <p>Any thoughts?</p>
  
  <p>Updated: 
  Database is MySQL. I have also changed inheritance strategy to JOINED instead of SINGLE_TABLE. Help</p>
  
  <p>Another Update: 
  I saw the following posting somewhere and it looks very interesting: <a href="http://opensource.atlassian.com/projects/hibernate/browse/ANN-140" rel="nofollow noreferrer">http://opensource.atlassian.com/projects/hibernate/browse/ANN-140</a></p>
  
  <p>New Update: 
  If I were to use SecondaryTable approach, how would I proceed then?</p>
  
  <p>Final Update: turns out the @Discriminator thing does not work well with hibernate. I used the @SecondaryTable approach and that took care of this issue for me. Thanks everyone for helping me out!</p>