hi there,
is it possible to do the following:
object(user) has an attribute which is a map(dataset), the map consists of keys and values where every value consitsts of another map with keys and values.
i tried to map that: wrapped an object around the 2nd level map but all that worked was when i mapped the first map to a SET.
User.hbm.xml:
<hibernate-mapping>
<class name="de.vfh.tellme.model.UserImpl" table="user">
<id name="ID" type="string" unsaved-value="null">
<column name="id" sql-type="char(32)" not-null="true"/>
<generator class="uuid.hex"/>
</id>
<property name="matrNr" type="string" not-null="true" length="30"/>
<property name="password" type="string" not-null="false" length="30"/>
<property name="administrator" type="boolean" not-null="true"/>
<many-to-one name="parent" outer-join="false" class="de.vfh.tellme.model.UserImpl" cascade="all"/>
<map name="dataSetsMap">
<key column="datasetsmap_id"/>
<one-to-many class="de.vfh.tellme.model.DataSetImpl"/>
</map>
</class>
</hibernate-mapping>
DataSet.hbm.xml:
<hibernate-mapping>
<class name="de.vfh.tellme.model.DataSetImpl" table="dataSet">
<id name="ID" type="string" unsaved-value="null">
<column name="id" sql-type="char(32)" not-null="true"/>
<generator class="uuid.hex"/>
</id>
<map name="dataMap">
<key column="datamap_id" />
<index column="datamap_key" type="string" length="32"/>
<element column="datamap_value" type="string" length="32"/>
</map>
</class>
</hibernate-mapping>
thanks in advance,
andr
|