<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.simplye.hibernate">
<class name="Animal" table="t_animal"> //可以设置抽象类,使抽象类不被创建 abstruct="true"
<id name="id">
<generator class="uuid"/> //或者手动生成assigned
</id>
<property name="name"/>
<property name="sex"/>
<union-subclass name="Pig" table="t_pig">
<property name="weight"/>
</union-subclass>
<union-subclass name="Brid" table="t_brid">
<property name="height">
</union-subclass>
</class>
</hibernate-mapping>
posted on 2009-03-02 01:26
simplye 阅读(164)
评论(0) 编辑 收藏 所属分类:
hibernate note