I'm trying to figure out how to get Hibernate (hbm2java) to using custom code templates during code generation. I found where you can tell the Ant task to look for custom templates in a directory. However, I can't find any documentation on what those template files look like. How do I write one?
I'm hoping I can write a custom template to make the code generation produce fields with custom annotations on them, such as @SomeCustomAnnotationName(value). I'm doing this in hopes that I can get hbm2java to include annotations such as @MaxLength(x) where x is whatever appears in the length attribute of a property tag. Do you think this is possible?
I greatly appreciate any help I can get.
|