Hi,
i have already written in the german forum, but i don´t know whether i get there an answer, so i want to ask here.
I have a class with a Map and the values of the map are also maps. The java code looks like this:
Code:
private TreeMap<Integer, TreeMap<Integer, Subject>> timetable = new TreeMap<Integer, TreeMap<Integer, Subject>>();
My Problem is that i don´t know what i have to write in the mapping file.
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="schoolplaner">
<class name="Timetable" table="TIMETABLE">
<id name="id" column="TIMETABLE_ID">
<generator class="native"/>
</id>
<property name="effectivWith" type="calendar"/>
<map name="timetable" table="TimetableSubjects">
<key column="id"/>
<map-key type="integer"/>
<!-- ??? -->
</map>
</class>
</hibernate-mapping>
This is my mapping file. Normally you write "element" or "one/many-to-many" after the map-key, but what do i have to write when the element is a map?
I hope you have understood me. My english is not very good.
Thank you in advance.
SebiB90