-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem modifying templates
PostPosted: Mon Oct 11, 2010 10:42 am 
Newbie

Joined: Wed Oct 29, 2008 11:19 am
Posts: 4
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.