当前位置: 代码迷 >> Eclipse >> hibernate有关问题,们,给解决
  详细解决方案

hibernate有关问题,们,给解决

热度:37   发布时间:2016-04-23 18:43:52.0
hibernate问题,大虾们,给解决啊
<?xml   version= "1.0 "   encoding= "utf-8 "?>
<!DOCTYPE   hibernate-mapping   PUBLIC   "-//Hibernate/Hibernate   Mapping   DTD   3.0//EN "
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd ">
<!--  
        Mapping   file   autogenerated   by   MyEclipse   -   Hibernate   Tools
-->
<hibernate-mapping>
        <class   name= "com.test.hibernate.bean.Contact "   table= "contact "   catalog= "test ">
                <id   name= "id "   type= "short ">
                        <column   name= "id "   />
                        <generator   class= "native "   />
                </id>
                <many-to-one   name= "person "   class= "com.test.hibernate.bean.Person "   fetch= "select ">
                        <column   name= "cid "   not-null= "true "   />
                </many-to-one>
                <property   name= "mobilePhone "   type= "string ">
                        <column   name= "mobilePhone "   length= "20 "   />
                </property>
                <property   name= "fixedPhone "   type= "string ">
                        <column   name= "fixedPhone "   length= "20 "   />
                </property>
        </class>
</hibernate-mapping>
///////////////////////////////////////////////////////////////////////
<?xml   version= "1.0 "   encoding= "utf-8 "?>
<!DOCTYPE   hibernate-mapping   PUBLIC   "-//Hibernate/Hibernate   Mapping   DTD   3.0//EN "
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd ">
<!--  
        Mapping   file   autogenerated   by   MyEclipse   -   Hibernate   Tools
-->
<hibernate-mapping>
        <class   name= "com.test.hibernate.bean.Person "   table= "person "   catalog= "test ">
                <id   name= "id "   type= "integer ">
                        <column   name= "id "   />
                        <generator   class= "native "   />
                </id>
  相关解决方案