I am using Hibernate 2.1, MS-SQL and many-to-many mapping.
This is one XML file
Code:
<hibernate-mapping>
<class name="com.snap.businessobjects.network.Network" table="SSN_NETWORKS">
...
<set name="members" table="SSN_NETWORK_MEMBERS">
<key column="NME_NET_ID"/>
<many-to-many column="MEM_ID" class="com.snap.businessobjects.member.Member"/>
</set>
</class>
</hibernate-mapping>
This is the one that the former refers to...
Code:
<hibernate-mapping>
<class name="com.snap.businessobjects.member.Member" table="SSN_MEMBERS">
...
</class>
</hibernate-mapping>
When I try to instanciate an instance of com.snap.businessobjects.network.Network (the first) get the following exception:
Code:
net.sf.hibernate.MappingException: An association from the table SSN_NETWORK_MEMBERS refers to an unmapped class: com.snap.businessobjects.member.Member
at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:643)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:743)
Please help, I am tried to deal with this for too long now...
TIA Oren