File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes ObjectNotFoundException No row with the given identifier exists Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "ObjectNotFoundException No row with the given identifier exists" Watch "ObjectNotFoundException No row with the given identifier exists" New topic
Author

ObjectNotFoundException No row with the given identifier exists

Sagar shi
Greenhorn

Joined: Mar 28, 2012
Posts: 2
1. EmpInformation file contains the <composite-id> tag and many-to-one with Department Class



Department class having composite-id with some more mapping - many-to-one and properties.



My Questions is whenever I am trying to call the ReportID on getDepartment it's giving error as org.hibernate.ObjectNotFoundException: No row with the given identifier exists: It seems I am not getting the Department info.



This is the stmt we are using to access the Dept information :



I want to point some more info here
1. Lazy is true by default so whenever I access the child table entity it should get that info but it won't.
2. It's mandatory update="false" insert="false" if I remove then it's asking me to put that.
Sagar shi
Greenhorn

Joined: Mar 28, 2012
Posts: 2
Here is something more which I got on google...

When there is a foreign key but the referenced row does not existed, or has been deleted, hibernate would throw an exception like this:

is someone agree with this?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ObjectNotFoundException No row with the given identifier exists
 
Similar Threads
hibernate association mistery
Foreig key must have same number of columns as the referenced primary key
Hibernate many to one composite primary key consisting foreign key
Problem with Hibernate composite key mapping
Please suggest on this Mapping