This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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?
 
wood burning stoves
 
subject: ObjectNotFoundException No row with the given identifier exists
 
Similar Threads
Foreig key must have same number of columns as the referenced primary key
Problem with Hibernate composite key mapping
Please suggest on this Mapping
hibernate association mistery
Hibernate many to one composite primary key consisting foreign key