Question

How to configure Hibernate Tools in Eclipse Indigo to make annotations on fields instead on getters, when generating model based on existing database?

Was it helpful?

Solution

I don't think that this is possible with the Hibernate Tools. The only thing that might come close to what you want is some custom code with the meta attributes, though I don't think it will exactly archive what you want to do.

OTHER TIPS

In Eclipse Juno I opened hibernate-tools-3.4.0.CR2.jar and copied dao and pojo directories to a folder in my project. Edit the freemarker files to comment these off PojoPropertyAccessors.ftl and put them on the PojoFields.ftl. Make sure that you specify you are using custom templates and the directory they are in in your eclipse hibernate code generation configuration.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top