title: NHibernate Validator with Fluent
body: <p>I'm trying to get my schema export to work with Validators Expressed in my Domain Object. I have a [NotNull] attribute AND a ValidatioDef on a property but the column is still expressed as nullable by the schema export. Im sure its a config issue, but not sure where. Some wiring has gone haywire. Here is my config and gerneration code.</p>
  
  <pre><code>[Test]
    public void GenerateSchemaWithValidation()
    {
  
     var nhvConfiguration = new FluentConfiguration();
     nhvConfiguration
        .SetDefaultValidatorMode(ValidatorMode.UseExternal)
        .Register(Assembly.Load("MyDomainAssembly")
         .ValidationDefinitions())
        .IntegrateWithNHibernate
          .ApplyingDDLConstraints()
          .And
          .RegisteringListeners();
  
     var nhibernateConfig = new Configuration().Configure();
  
     var validatorEngine = new ValidatorEngine();
     validatorEngine.Configure(nhvConfiguration);
  
     nhibernateConfig.Initialize(validatorEngine);
  
     ConfigureDatabaseAndMappings()
      .ExposeConfiguration(cfg =&gt; new SchemaExport(cfg).Create(true, true))
      .BuildSessionFactory();
    }
  
  protected static FluentConfiguration ConfigureDatabaseAndMappings()
      {
          return Fluently.Configure()
              .Database(
                  MsSqlConfiguration.MsSql2005.ConnectionString(c =&gt; c.FromConnectionStringWithKey("MyDb"))
                  .ShowSql())
              .Mappings(m =&gt; 
                  m.FluentMappings.AddFromAssemblyOf&lt;MediaDescriptionMap&gt;()
                  .Conventions.AddFromAssemblyOf&lt;WellNamedForeignKeyColumnConvention&gt;());
  
  
      }
  </code></pre>