Hello,
with these information I can only say: Your mapping-file is wrong.
I have got a class "HeaderSchl" with a collection (1:N) of "HeaderSchlg". "HeaderSchlg" has a composite id on "HeaderSchl" and "HeaderSchlg".
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" namespace="vap.Hore.HoreHibernate" assembly="HoreHibernate">
<class name="HeaderSchl" table="VWHeaderSchl" lazy="false">
<id name="HeaderSchl" column="HeaderSchl" type="String">
<generator class="assigned" />
</id>
<property name="Bez" column="Bez" type="String" />
<bag name="HeaderSchlg_Bag" lazy="true">
<key column="HeaderSchlg" />
<one-to-many class="HeaderSchlg" />
</bag>
</class>
<class name="HeaderSchlg" table="VWHeaderSchlg" lazy="false" >
<composite-id>
<key-many-to-one name="HeaderSchl" column="HeaderSchl" class="HeaderSchl" />
<key-property name="HeaderSchlg" column="HeaderSchlg" type="String" />
</composite-id>
<property name="Bez" column="Bez" type="String" />
</class>
</hibernate-mapping>
And don't forget to implement in the composite id class
Code:
Public Class HeaderSchlg
Public Overrides Function Equals(ByVal obj As Object) As Boolean
Public Overrides Function GetHashCode() As Integer
End Class
More information, more help ;)
Thomas