求Hibernate中由pojo生成hbm的工具

请问各位前辈,你们在实际开发中通过破解哦生成hbm文件(pojo优先模式)时,都用什么工具啊?除了myeclipse……

你可以采用Xdoclet和ant结合:
/**

  • @hibernate.class
  •  table="T_Party"
    

    */
    public class Party {

    /**

    • @hibernate.id
    • generator-class="native" */ private int id;

    /**

    • @hibernate.many-to-one
    • column="parentid"
      */ private Party parent;

    /**

    • @hibernate.set
    • @hibernate.key
    • column = "parentid"
    • @hibernate.one-to-many
    • class = "com.bjsxt.oa.model.Party"
      */ private Set children; ant文件中你可以定义: <?xml version="1.0" encoding="GBK"?>












    name="xdoclet"
    classname="org.xdoclet.ant.XDocletTask"
    classpathref="xdoclet.task.classpath"
    />







    classname="org.xdoclet.plugin.hibernate.HibernateConfigPlugin"
    destdir="${src.dir}"
    version="3.0"
    hbm2ddlauto="update"
    jdbcurl="jdbc:mysql://127.0.0.1/oa_200706"
    jdbcdriver="com.mysql.jdbc.Driver"
    jdbcusername="root"
    jdbcpassword="mysql"
    dialect="org.hibernate.dialect.MySQLDialect"
    showsql="true"
    />







    classname="org.xdoclet.plugin.hibernate.HibernateMappingPlugin"
    version="3.0"
    destdir="${src.dir}"
    />


用hibernateTools

http://blog.l-spark.cn/2009/04/11/%E5%AE%89%E8%A3%85hibernate-tools-in-eclipse-ide.html

推荐hibernateTools 很好用。用Eclipse插件做起来也不麻烦,速度也很快,我知道要有一个插件是com.hudson.hibernatesynchronizer_3.1.9 比Myeclipse自带的插件要好,个人看法。如果你需要可以发给你。。

[url=http://www.eclipseworld.org/bbs/read.php?tid=1519]HibernateTools使用详细说明[/url]

[url=http://www.jboss.org/community/wiki/InstallingJBossTools]JBossTools安装详细说明[/url]

PS:HibernateTools属于JBossTools。

朋友,问题要自动关闭啦,结分哦,