I'd also like to point out that uses who use the IDE tool-chain to generate DDL scripts using the hibernate-tools library will also output table definitions that will specify the length of the column as 255 rather than 1000 based on the user's example. This is because the tool-chain library uses the SchemaExport and SchemaUpdate classes which merely look at the mapping data, which doesn't invoke the Bean Validation Integrator to manipulate the mapping data. I think this is something that I need to talk with the team about and see whether we truly intend to support the example you've mentioned above. While ORM can make some run-time assumptions and manipulate models on-the-fly, I'm inclined to say that applying a @Column annotation is the cleanest and most portable way to insure all situations generate the most accurate representation of the data model. |