I'm far from a Hibernate expert, but since I have recent experience with this (see
http://forum.hibernate.org/viewtopic.php?t=61) I'll take a stab.
You can't reference only one (or any less than all) of the fields in a foreign key. At least, when I try to generate DDL from a mapping file, if my many-to-one relationships mismatch the number of fields in the key of the "one side" of the relationship, hbm2ddl throws an exception. (message "Foreign key must have same number of columns as referenced primary key")
You can define more than one column for the relationship in a many-to-one mapping, though.
Try something like this:
Code:
<class name="A" table="A">
<many-to-one name="B" outer-join="false" class="B">
<column name="key_column_1"/>
<column name="key_column_2"/>
</many-to-one>
</class>