I have two tables as follows:
Table A:
site [pk]
group [pk]
Table B:
group [pk]
method[pk]
gate [pk]
Composite key for A - [site-group].
Composite key for B - [group-method-gate].
How to Retrieve all records of A's table associated with B table on column Group value only? group can have multiple entries in both tables, not a unique column.
Both tables are independent on mysql, I have to make join in hbm file using group column available in both tables.
Something like as following on class B
<set name="SiteGroup" table="A"
inverse="true" lazy="true" fetch="select">
<key column="group"/>
<one-to-many class="A's as class " />
</set>