<?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">
<hibernate-mapping>
<class name="包.类" talbe="表" >
<id name="id" table="id" tyep="long">
<generator class="native"/>
</id>
<property name="类属性" column="表字段" type="" not-null="true"/>
<bag name="组件名" talbe="对应表">
<key column="对应表外键"/>
<element type="" column="对应表字段" not-null="true"/>
</bag>
</class>
</hibernate-mapping>
类: private Collection<String>组件名;