Hi There,
I wanted the annotations to be on the field level instead to be on the getter level.
I unzipped hibernate-tools.jar (3.2.4GA) and modified in the pojo folder the following:
I simply moved the line
"<#include "GetPropertyAnnotation.ftl"/>" from PojoPropertyAccessors to PjoFields.ftl, line 7.
Now hibernate, while reverse engineering, complains:
Quote:
org.hibernate.tool.hbm2x.ExporterException: Error while processing Entity: temp.entities.TAnswerTemplate with template pojo/Pojo.ftl
Error while processing Entity: temp.entities.TAnswerTemplate with template pojo/Pojo.ftl
freemarker.core.InvalidReferenceException: Expression property is undefined on line 3, column 6 in pojo/Ejb3PropertyGetAnnotation.ftl.
Expression property is undefined on line 3, column 6 in pojo/Ejb3PropertyGetAnnotation.ftl.
freemarker.core.InvalidReferenceException: Expression property is undefined on line 3, column 6 in pojo/Ejb3PropertyGetAnnotation.ftl.
Expression property is undefined on line 3, column 6 in pojo/Ejb3PropertyGetAnnotation.ftl.
Alright, property is undefined, so I replaces property by field which seems to be available in this context.
Now it complains about:
Quote:
org.hibernate.tool.hbm2x.ExporterException: Error while processing Entity: temp.entities.TAnswerTemplate with template pojo/Pojo.ftl
Error while processing Entity: temp.entities.TAnswerTemplate with template pojo/Pojo.ftl
freemarker.core.InvalidReferenceException: Expression pojo.hasIdentifierfield is undefined on line 2, column 6 in pojo/Ejb3PropertyGetAnnotation.ftl.
Expression pojo.hasIdentifierfield is undefined on line 2, column 6 in pojo/Ejb3PropertyGetAnnotation.ftl.
freemarker.core.InvalidReferenceException: Expression pojo.hasIdentifierfield is undefined on line 2, column 6 in pojo/Ejb3PropertyGetAnnotation.ftl.
Expression pojo.hasIdentifierfield is undefined on line 2, column 6 in pojo/Ejb3PropertyGetAnnotation.ftl.
Now I do not know how to go on, as I think that pojo should be available in this context.
Any ideas? Would really appreciate any help!
Thanks in advance,
Yanni