2 Replies Latest reply on Sep 12, 2006 12:17 PM by kthackray

    custom templates

    kthackray

      Dear all,

      I would like to generate, based on 1 set of hmb.xml files, 2 kind of classes: the domain pojos for the server side and their equivalent for the client side.
      My hbm.xml files contains the definition for the server side. I have then 2 sets of custom templates, with 2 hbm2java task (1 for server side/1 for client side)

      <hibernate-mapping package="be.xxx.server.domain.model">
       <class table="table" name="Table">
      ...


      In my Pojo.ftl (for the client side), as my client/server domain code package naming is quite similar, I use this trick to customize the package declaration:

      ${pojo.getPackageDeclaration()?replace("server", "client")}


      For the client side, everything is going fine, except that the generated code does not go into the correct package; generated classes still end up in the server side packages, even with my custom Pojo.ftl

      Am I clear? Is it possible?

      Thanks in advance,

      Kevin.