문제

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