title: How to generate comments in hbm2java created POJO?
body: <p>My current setup using hibernate uses the <code>hibernate.reveng.xml</code> file to generate the various <code>hbm.xml</code> files. Which are then turned into POJOs using <code>hbm2java</code>. We spent some time while designing our schema, to place some pretty decent descriptions on the Tables and there columns. I am able to pull these descriptions into the <code>hbm.xml</code> files when generating them using <code>hbm2jhbmxml</code>.</p>
  
  <p>So I get something similar to this:</p>
  
  <pre><code>&lt;class name="test.Person" table="PERSONS"&gt;
    &lt;comment&gt;The comment about the PERSONS table.&lt;/comment&gt;
    &lt;property name="firstName" type="string"&gt;
        &lt;column name="FIRST_NAME" length="100" not-null="true"&gt;
            &lt;comment&gt;The first name of this person.&lt;/comment&gt;
        &lt;/column&gt;
    &lt;/property&gt;
    &lt;property name="middleInitial" type="string"&gt;
        &lt;column name="MIDDLE_INITIAL" length="1"&gt;
            &lt;comment&gt;The middle initial of this person.&lt;/comment&gt;
        &lt;/column&gt;
    &lt;/property&gt;
    &lt;property name="lastName" type="string"&gt;
        &lt;column name="LAST_NAME" length="100"&gt;
            &lt;comment&gt;The last name of this person.&lt;/comment&gt;
        &lt;/column&gt;
    &lt;/property&gt;
  &lt;/class&gt;
  </code></pre>
  
  <p><strong>So how do I tell <code>hbm2java</code> to pull and place these comments in the created Java files?</strong></p>
  
  <p>I have read over <a href="http://docs.jboss.org/tools/2.1.0.Beta1/hibernatetools/html/codegen.html" rel="nofollow noreferrer">this</a> about editing the freemarker templates to change the way code is generated. I under stand the concept, but it was not to detailed about what else you could do with it beyond there example of pre and post conditions.</p>