Joined: Thu Feb 21, 2008 4:57 am Posts: 2
|
I want to generate Hibernate code automatically. I am using Middlegen-Hibernate-r5. I am using MySQL5. I can able to generate hbm files through ant script. I can also able to generate POJO classes using hbm2java target in the build.xm file. I am using this code to genearate POJOs and DAOs...
<target name="hbm2java" description="Generate .java from .hbm files.">
<taskdef
name="hbm2java"
classname="net.sf.hibernate.tool.hbm2java.Hbm2JavaTask"
classpathref="lib.class.path"
/>
<hbm2java output="pojos">
<fileset dir="${build.gen-src.dir}">
<include name="**/*.hbm.xml"/>
</fileset>
</hbm2java>
</target>
But I am only getting POJSs. How I need to generate DAO classes for those..
I am new to this forum....May be my question is wrong or simple....Please reply me as soon as possible....
Thanks,
Mahesh.
|
|