-->
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.  [ 5 posts ] 
Author Message
 Post subject: Help to learn template-language?
PostPosted: Tue Aug 21, 2007 8:53 am 
Newbie

Joined: Mon Jul 16, 2007 6:26 am
Posts: 13
Hi NG!

I want to implement the hibernate-tool-hbm-generate-template "component.hbm.ftl" to fit my needs.

I've learned, that the ftl-files are written in freemarker, so i have
to learn this. Is there any documentation available, that would
help me learning freemarker in the context of hibernate-tools?

Regards,

Berti


Top
 Profile  
 
 Post subject: first question arising...
PostPosted: Tue Aug 21, 2007 10:04 am 
Newbie

Joined: Mon Jul 16, 2007 6:26 am
Posts: 13
How can I get informations about the datamodel available
during generation of a hbbm-file?

E.G. where do the variables c2h and clazz come from?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 21, 2007 8:54 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
The best way it to firstly understand how freemarker is executed - eg - setting up the variable context. Then read the source to the tools - it should become clear once you reviewed the code base.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 22, 2007 5:25 am 
Newbie

Joined: Mon Jul 16, 2007 6:26 am
Posts: 13
david wrote:
The best way it to firstly understand how freemarker is executed - eg - setting up the variable context. Then read the source to the tools - it should become clear once you reviewed the code base.


Thanks for your comment!

ATM I'm digging deeper into the topic with the hibernate-api, the hibernate-tools-sources and the freemarker-documentation.

At the moment I don't understand, how to access the properties
of the embedded class when rendering the embedding class.

At the point when hibernate-tools is rendering the file component.hbm.xml the embedded class is a property of the embedding class. So I want to access the properties of a property. I can't figure out how this could work...

Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 6:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Look at the java/pojo templates how they handle the properties.

_________________
Max
Don't forget to rate


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

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.