你可以在hibernate.cfg.xml 中加入<property name="hibernate.hbm2dd.auto">update</property>这样就可以根据pojo类建立表结构了java是面向对象的语言,这中有实体对象生成表也 是hibernate推荐的不是由表牵制对象,而是有对象创建表

解决方案 »

  1.   

    hibernate.cfg.xml 中加入 <property name="hibernate.hbm2dd.auto">update </property> 这样就可以根据pojo类建立表结构了 java是面向对象的语言,这中有实体对象生成表也 是hibernate推荐的 
      

  2.   

    hibernate.cfg.xml 中加入 <property name="hibernate.hbm2dd.auto">update </property> 这样就可以根据pojo类建立表结构了 java是面向对象的语言,这中有实体对象生成表也 是hibernate推荐的 
      

  3.   

    hibernate.cfg.xml 中加入 <property name="hibernate.hbm2dd.auto">update </property> 这样就可以根据pojo类建立表结构了 java是面向对象的语言,这中有实体对象生成表也 是hibernate推荐的 
      

  4.   

    hibernate.cfg.xml 中加入 <property name="hibernate.hbm2dd.auto">update </property> 这样就可以根据pojo类建立表结构了 java是面向对象的语言,这中有实体对象生成表也 是hibernate推荐的 
      

  5.   

    hibernate.cfg.xml 中加入 <property name="hibernate.hbm2dd.auto">update </property> 这样就可以根据pojo类建立表结构了 java是面向对象的语言,这中有实体对象生成表也 是hibernate推荐的 
      

  6.   

    你指的是数据模型的E-R图么? 那就是通过外键创建。
    但是我一般都是先建好单个的模型表,表与表之间没有任何关联,再用hibernate反向生成pojo之类的东西,然后在修改hbm.xml和pojo的属性,最后<property name="hibernate.hbm2dd.auto">create</property>。
    好了后,再把<property name="hibernate.hbm2dd.auto">create</property>去掉。