Hi,
i get always this Exception:
Code:
Exception in thread "AWT-EventQueue-1" java.lang.ClassCastException: admintool.data.Diagnose$$EnhancerByCGLIB$$48bb0b3e incompatible with java.util.Set
Behandlung.hbm.xml:
Code:
<hibernate-mapping>
<class name="admintool.data.Behandlung" table="behandlung">
<id name="id" column="id" type="java.lang.Integer">
<generator class="increment"></generator>
</id>
<set name="diagnose_nr">
<key column="diagnose_nr"/>
<one-to-many class="admintool.data.Diagnose"/>
</set>
<many-to-one name="krankenhaus_nr" column="krankenhaus_nr" class="admintool.data.Krankenhaus"/>
</class>
</hibernate-mapping>
Diagnose.hbm.xml:
Code:
<hibernate-mapping>
<class name="admintool.data.Diagnose" table="diagnose">
<id name="id" column="id" type="java.lang.Integer">
<generator class="increment"></generator>
</id>
<many-to-one name="krankenhaus_nr" column="krankenhaus_nr" class="admintool.data.Krankenhaus"/>
<many-to-one name="patient_nr" column="patient_nr" class="admintool.data.Patient"/>
</class>
</hibernate-mapping>
i think the error is the relation one-to-many with set or something like this:/
a Diagnose = diagnosis
a Behandlung = treatment
one treatment has more diagnosis!!!
i hope someone is able to help me -
triplex