详解 hibernate mapping配置

详解 hibernate mapping配置

https://www.jb51.net/article/115130.htm

<?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 Persistence Tools -->
<hibernate-mapping>
    <class name="com.aaa.bbb.model.ClassName" table="ClassName">
        <id name="id" type="integer">
            <column name="id" />
            <generator class="native" />
        </id>
        <property name="title" type="string">
            <column name="title" length="50">
                <comment>xxx_name</comment>
            </column>
        </property>
        <property name="href" type="string">
            <column name="href" length="254" not-null="true">
                <comment>address</comment>
            </column>
        </property>
    </class>
</hibernate-mapping>

  

原文地址:https://www.cnblogs.com/yuyu666/p/12659825.html