I'm trying to do this:
select * from A, B where A.id1=B.id1 and A.id2=B.id2
Assume relationship between A and B is 1-to-many
.
I'm using Hibernate mapping XML:
<set name="mapAnalysisResults" table="ANALYSIS_RESULTS" inverse="true" cascade="all">
<key column="MAP_ID"/>
<key column="ANALYSIS_OPER"/>
<one-to-many class="com.st.wma.datalayer.hibernate.model.AnalysisResults"/>
</set>
Having multiple <key>
tags inside <set>
generates runtime error.
Is it possible to have multiple join conditions in Hibernate?