A comment and a question--
1) Assuming table TYPE represents user types, you should make TYPE a lookup table (read-only) and put a TYPE_ID in table USER instead of the other way around (your schema).
2) Also, if you have a TYPE_ID in table TYPE, why can't that id alone be a unique id for Type entities? (since you've already named it "type id"...)
Whatever your reason, you can try adding a surrogate key to Type table:
Code:
Type
=========
ID -- PK,
TYPE_ID,
USER_ID, -- FK to User
....
Now the mapping should look like:
Code:
<class name="Type" table="TYPE">
<id name="id" column="ID" type="...">
<generator type="..."/>
</id>
<property ... />
<property ... />
<set name="user" inverse="true">
<key column="USER_ID"/>
<one-to-many class="User"/>
</set>
</class>
Of course TYPE_ID now becomes just another property for Type, but if 1) is what you're trying to do, then just get rid of TYPE_ID and you're all set.
jd