[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - hibernate tool template problem

kerny3d do-not-reply at jboss.com
Wed Aug 27 05:03:43 EDT 2008

Hi all.

I am developing a template for Hibernate Tool and i have a little problem. 

Is there "something" to know if a column of an entity is an id?

I've searched in every *.ftl under pojo dir in hibernate-tools.jar but i've found nothing.

Currently, the snippet that i use is:

<#foreach field in pojo.getAllPropertiesIterator()>
  |   <#if !field.equals(clazz.identifierProperty)>
  |     <#if pojo.getMetaAttribAsBool(field, "gen-property", true)>
  |       ${fieldsForInitConstructor}${pojo.getJavaTypeName(field, jdk5)} ${field.name}
  |     </#if>
  |   </#if>
  | </#foreach>

Thanks in advance

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4172764#4172764

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4172764

More information about the jboss-user mailing list