2 Replies Latest reply on Apr 23, 2007 3:13 PM by Rene Lavoie

    seam-gen hbm to entities

    Rene Lavoie Newbie

      Hello,

      I was wondering if there was an easy way to generate a seam project from a hibernate map file to help me migrate some spring projects.

      I tried generating from the DB, but the relations are not quite the way they are defined in my hibernate mapping files + I loose component objects.

      Thanks,

      Btw, I'd like to congratulate the whole Seam team, Seam went a long way since I first played with it.

        • 1. Re: seam-gen hbm to entities
          Hari N Newbie

          Hi
          Look into the build.xml of seam-gen . There is a <jdbc-configuration> tag under the generate-entities target.

          Replace that with the tag

          The following works for me :

           <hibernate templatepath=".">
           <configuration>
           <fileset dir="${project.home}/xml-t">
           <include name="**/*.hbm.xml" />
           </fileset>
           </configuration>
          <!--
           <jdbcconfiguration propertyfile="build.properties"
           packagename="${model.package}"
           revengfile="${project.home}/resources/seam-gen.reveng.xml"
           detectmanytomany="false"/>
          -->
          

          Regards
          Hari



          • 2. Re: seam-gen hbm to entities
            Rene Lavoie Newbie

            Thanks Hari, worked like a charm.