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

有帮助吗?

解决方案

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.

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top