Hi, I'm pretty new with Hibernate, and I'm facing some trouble working with composite ids and foreing keys, I just want to make this work:
======= =======
Table A Table B
======= =======
atr1 PK atr1 FK(Table A, atr1) PK
atr2 PK atr2 FK(Table A, atr2) PK
atr3 atr3 FK(Table C, atrN) PK
atr4
And the relation is the following: A has (knows) none ore more instances of B (a list of them), and B has (knows) just one instance of C (this is not a problem by now).
I've read something about using classes to point composite ids (in the official tutorial), overriding equals() and hashCode() but I can't make this work because I'm pretty confused about how to write my hbm.xml files...
Any help? Thanks!