title: Generate DDL from Entities basing on JSR 303 Validator annotations
body: <p>I am generating DDL from Hibernate entities. Some of the entities are using the JSR 303 validator annotations (javax.validation.constraints.Max - is one of them).</p>
  
  <p>The DDL is generated using Hibernate Tools 4.0.0 CR1 + related Ant Task.</p>
  
  <p>The problem is that all text columns (even though they may be limited by @Max(32)) are generated as VARCHAR(255). I have tried to debug the org.hibernate.tool.hbm2ddl.SchemaExport class (and related). From what I have seen, there is no place during construction of org.hibernate.cfg.Ejb3Column that would contain any logic related to Validator annotations.</p>
  
  <p>I have also tried to modify 'hibernate.validator.apply_to_ddl' property - without any success. </p>
  
  <p>Any hints would be greatly appreciated.</p>
  
  <p>Components/Libraries:</p>
  
  <ul>
  <li>JDK 6</li>
  <li>Hibernate Validator 4.3.0 Final</li>
  <li>Hibernate Commons Annotations 4.0.2 Final</li>
  <li>Hibernate Core 4.2.2 Final</li>
  <li>Hibernate Entity Manager 4.2.2 Final</li>
  </ul>
  
  <p>Rafal</p>