aspose file tools*
The moose likes Object Relational Mapping and the fly likes No persister for: java.lang.Integer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "No persister for: java.lang.Integer" Watch "No persister for: java.lang.Integer" New topic
Author

No persister for: java.lang.Integer

Neil Lowrey
Greenhorn

Joined: Nov 08, 2004
Posts: 2
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

Joined: May 17, 2004
Posts: 15
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.


Gosh ! Darn it.
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
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


blog - InfoQ.com
Neil Lowrey
Greenhorn

Joined: Nov 08, 2004
Posts: 2
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.
 
 
subject: No persister for: java.lang.Integer
 
Similar Threads
[SPRING] problem with oracle LOB
Hibernate: Found two representations of same collection
hbm.xml file does an update instead of an insert- Helppppp
Hibernate - Row was updated or deleted by another transaction..
ConstraintViolationException in Hibernate