Hibernate中如何为List,Map进行配置


下面是 set list map array的配置
希望对你有帮助:

<set name="setValue" table="t_set">
<key column="set_id"/>
<element column="set_value" type="string"/>
</set>
<list name="listValue" table="t_list">
<key column="list_id"/>
<list-index column="list_index"/>
<element column="list_value" type="string"/>
</list>
<map name="mapValue" table="t_map">
<key column="map_id"/>
<map-key type="string" column="map_key"/>
<element type="string"困纳 column="map_value"/>
</map>
<array name="arrayValue" table="t_array">
<key column="array_id"/汪氏没>
<list-index column="核镇array_index"/>
<element column="array_value" type="string"/>
</array>
不明白题圆凯目则吵是什么意思

正常来说。Hibernate需要配孙腔侍置的就是hbm文件。即:类和表之间的映射关系

在数据库中没有List,Map这种类型的字段吧。