• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

No persister for: java.lang.Integer

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic