I'm receiving this exception while saving an entity with a composite id that includes a many-to-one relationship to it's parent table. The trackingNumber and fiscalYear are primitive int, while the appropriationType is String. The child entity, RequestFundingFica, overrides equals/hashCode and implements Synchronized.
Here's the parent table mapping:
Here's the child table mapping:
With debug turned on, I get the following in the log:
Hibernate.org says that it is better to use Objects for Primary Keys. May be the problem will be resolved if you change the Primary Key type to Long/Integer on your ORDERS table. You might want to do the same on the Child table too.
I had remembered to included the hbm.xml file, so that wasn't the problem. At this point, I'm still not sure why this wasn't working. Due to time constraints, I have abandoned the composite key in favor of a surrogate key generated from a sequence. It's working like a champ now.