Hello,
I want to know how I can add extra code in the DAOs.
In the pojo class is simple:
Code:
<#if pojo.hasMetaAttribute("class-code")>  // The following is extra code specified in the hbm.xml files
${pojo.getExtraClassCode()}
  // end of extra code specified in the hbm.xml files
</#if>
I put this code in the daohome.ftl:
Code:
<#if pojo.hasMetaAttribute("dao-code")>
${pojo.getMetaAsString("dao-code")}
</#if>
And put this meta tag in the hbm.xml:
Code:
<meta attribute="dao-code">
           <![CDATA[
               /**
               * Add an airport to this country
               */
               public void addAirport(Airport airport) {
               airport.setCountry(this);
               if (airports == null) {
               airports = new java.util.HashSet();
               }
               airports.add(airport);
               }
           ]]>
</meta>
But it doesn't work.
Any ideas?