Hello,
I am attempting to the following
A -----> A_B <------- B
I want to have a 1 - 1 mapping between A and B via the associating class/table A_B
I have been able to cheat and use the following to get many to many but i don't want many to many (at least i don't think so), i want it so that A has a getB() and vis versa.
The following is in the B mapping for example
Code:
<set name="aSet" inverse="false" table="A_B">
<cache usage="read-write" region="org.hibernate.cache.StandardQueryCache" />
<key>
<column name="B_ID" precision="22" scale="0" not-null="true" />
</key>
<many-to-many entity-name="com.test">
<column name="A_ID" precision="22" scale="0" not-null="true" />
</many-to-many>
</set>
This allows the ability to select B and have a in be in a getter but still as a set and NOT as a single one-one.
Any ideas oh how i can remove the hack and have it associated one-one.
Thanks,
Brad