I believe what you're describing is a one-to-many relationship with a join table, as described here:
http://www.hibernate.org/hib_docs/v3/re ... l-join-12m
However, unlike the example provided there, you're using a self-referential association, i.e., the parent and child tables/classes are the same. I could be wrong, but I think the way to do this is to just do both the parent and child mappings within the same class. Something like this might work:
Code:
<class name="Term" table="Term">
<id name="id" column="Term_id">
<generator class="native"/>
</id>
<set name="children" table="Term_map">
<key column="Parent_term_id"/>
<many-to-many column="Child_term_id" unique="true" class="Term"/>
</set>
<join table="Term_map" inverse="true" optional="true">
<key column="Child_term_id"/>
<many-to-one name="parent" column="Parent_term_id" not-null="true"/>
</join>
</class>
(I've left out the property mappings for the non-key fields for the sake of simplicity).
Note that I just copied the example from the above documentation page and changed it around to fit your scenario. I haven't actually tried doing something like this, so I'm not certain that it works. It should be worth a try, though.
Also note that this mapping treats Child_term_id as the primary key of the Term_map table. Unless you plan for a child to be able to have more than one parent, it isn't necessary for Parent_term_id to be part of the primary key.