I have a Table And Entity called Software
Software
- Id
 - Serial
 - Name
 - LinkedSoftware (This field is in the Entity)
 
Then I have a Table LinkedSoftware with no Entity
LinkedSofware
- BaseSoftwareId (Relationship with Software.Id)
 - LinkedSoftwareId (Relationship with Software.Id)
 
I am struggling to setup my hibernate mapping file, keep getting mapping errors. I have tried the following with no luck:
<set name="linkedSoftware" access="field" cascade="all-delete-orphan" table="LinkedSoftware">
  <many-to-many class="Software" column="BaseSoftwareId" />
  <many-to-many class="Software" column="LinkedSoftwareId" />
</set>
<many-to-one name="LinkedSoftware" column="BaseSoftwareId"       cascade="save-update" class="Software" />
<many-to-one name="LinkedSoftware" column="LinkedSoftwareId" cascade="save- update" class="Software" />-->
Is there anyone that can please point me in the right direction. I tried to google but couldnt really find an answer.