From your UserConfigSettings mapping :
Quote:
<property name="principalID">
<column name="fk_id_principal" sql-type="integer" not-null="true"/>
</property>
This is definitely NOT what you want. It is clear to me that you want a bidrectional relationship between a principal and settings. So, a principal has a one-to-many relation to its settings and a setting has a many-to-one relationship to its principal.
However, as I quoted above you have pricipleID because you were thinking relational when making your UserConfigSettings object. Your object really wants a Principal reference NOT a reference to an ID. So, get principalID out of that class, put a Principal refererence in there instead. Then, make your mapping a many-to-one from UserConfigSettings to Principal. Specify your cascade stuff. Watch out for inverse=true (READ FORUM ABOUT IT).
Hibernate manages persistent IDs for you if you let it.
Your error makes sense. You expected hibernate to fill some property in a class for you. It didnt fill it in so it was null and then you tried to save the null value on a column that you specified not-null=true on.
You really should go through the parent/child section of the reference manual. Read Hibernate in Action.
Anyway, good luck.
joe