I use a map.
but hibernate can not to find a value(clob type) by item.
for example. if revision have m1, m2. then m1 have 'test' value. and m2 have null value.
this problem cause value type is clob.Code:
Meta haveMeta = metaDao.findByCode("M1");
Meta nullMeta = metaDao.findByCode("M2");
Revision revsion = revisionDao.getRevision(123);
revision.getMetaDatas().get(haveMeta); // return "test". ok
revision.getMetaDatas().get(nullMeta); // return null. not contain in map. fail.
Code:
<class name="Revision">
<map name="metaDatas" table="REVISION_META" cascade="all,delete-orphan">
<key column="REVISION_SEQ"></key>
<map-key-many-to-many class="com.vine.edms.contents.meta.Meta" column="META_CODE" />
<element type="text">
<column name="META_VALUE" />
</element>
</map>
</class>
critical problem is "no update this record". if try to update data, then hibernate insert record.-_-;;
how to solve this problem?