Hello I need to have a bidirectionnal relationship on the same class (kind of inheritance architecture)
So, my class has 2 many to many with itself declared in the mapping:
Code:
<set name="groups" inverse="false" lazy="true" table="GROUP_HIERARCHY" fetch="select">
<key column="group_parent_id"/>
<many-to-many entity-name="com.project.model.Group">
<column name="group_child_id" />
</many-to-many>
</set>
<set name="parents" inverse="true" lazy="true" table="GROUP_HIERARCHY" fetch="select">
<key column="group_child_id"/>
<many-to-many entity-name="com.project.model.Group">
<column name="group_parent_id"/>
</many-to-many>
</set>
My issue is that when I perform a Criteria on both aliases (parents and groups) it doesn't seem to work.
Am I missing something here?