-
1. Re: Seam-Gen - Freemarker HibernateTools?
israel.bgf Jun 4, 2008 7:18 PM (in response to israel.bgf)any ideas?
-
2. Re: Seam-Gen - Freemarker HibernateTools?
atao Jun 5, 2008 9:25 PM (in response to israel.bgf)There is no tutorial.
You have to dig into the code:
http://anonhibernate.labs.jboss.com/trunk/HibernateExt/tools/src/java/and to guess the classes and properties from the freemarker names, e.g.
c2h
is for Cfg2HbmTool.javaTo get some general ideas about hibernate tools, see:
http://www.hibernate.org/hib_docs/tools/reference/en/html_single -
3. Re: Seam-Gen - Freemarker HibernateTools?
nicolasrollin Aug 3, 2008 11:29 PM (in response to israel.bgf)Same thing for me,
I'm trying to modify the list.xhtml.ftl file to add a comparaison if the field is the key.
Even if there is no tutorial, can someone give us the object which contains the method of pojo like pojo.isComponent ?
Thank you
-
4. Re: Seam-Gen - Freemarker HibernateTools?
atao Aug 4, 2008 10:18 AM (in response to israel.bgf)I'm not sure of what you want, but for
comparaison if the field is the key
, try something like:<#foreach property in pojo.allPropertiesIterator> <#if ! property.equals(pojo.identifierProperty) /> [...] </#if> </#foreach>
-
5. Re: Seam-Gen - Freemarker HibernateTools?
luxspes Aug 4, 2008 5:30 PM (in response to israel.bgf)Exactly, you have to dig in to the code in http://anonhibernate.labs.jboss.com/trunk/HibernateExt/tools/src/java/ it is initialized in the constructor of org.hibernate.tool.hbm2x.AbstractExporter
public AbstractExporter() { c2h = new Cfg2HbmTool(); c2j = new Cfg2JavaTool(); }
as you can see, it is as Pierre Raoul wrote, of type Cfg2HbmTool.
On the other hand pojo IIRC is of type org.hibernate.tool.hbm2x.pojo.EntityPOJOClass (also found under /HibernateExt/tools/src/java/)
If you have more questions on the inner workings of seam-gen, it could be a better idea to post the on JBoss tools forums
Regards,