实体类和数据库映射--配置文件
时间:2021-07-01 10:21:17
帮助过:2人阅读
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"><hibernate-mapping package="entity" > <class name="Student" table="T_STUDENT" mutable="false" dynamic-update="true" dynamic-insert="true"> <id name="id" column="S_ID"> <generator class="native"/> </id> <property name="name" column="S_NAME" type="string" not-null="true" length="20" unique="false" /> <property name="desc" column="S_DESC"/> <property name="birthDate" column="S_BIRTHDATE"/> </class>
</hibernate-mapping>
generator属性表示持续化类生产唯一的标记
实体类和数据库映射--配置文件
标签: