<id name="id">
<generator class="native"/>
</id>
<property name="name"/>
<set name="setValue" table="t_set_value"> // set的映射
<key column="set_id"/> // 外键关联
// <composite-element> 对象集合
<element type="string" column="set_value"> // 字符串集合 放入表中
</set>
<list name="listValue" table="t_list_value"> //list的映射
<key column="list_id"/>
<list-index column="list_index"/> // 将存入表数据排序放入一个字段中
<element type="string" column="list_value"/>
</list>
<array name="arrayValue" table="t_array_value">
<key column="array_id"/>
<array-index column="array-index"/>
<element type="string" column="array_value"/>
</array>
<map name="mapValue" table="t_map_value">
<key column="map_id" />
<map-key type="string" column="map_key"/> //存放map中的key值
<element type="string" column="map_value"/> //存放map中的value值
</map>
</class>
</hibernate-mapping>
posted on 2009-03-03 17:59
simplye 阅读(236)
评论(0) 编辑 收藏 所属分类:
hibernate note