Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No persister for: java.lang.Integer

 
Neil Lowrey
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:



What am I missing here?
 
Praveen Kumar
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Good Luck,

Praveen.
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a link to something similar: link.
If the solution there doesn't work for you, I suggest you should use the Hibernate forum.

./pope
 
Neil Lowrey
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the responses over the weekend!

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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic