-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: ObjectNotFoundException for newly-created objects
PostPosted: Thu Aug 05, 2010 7:17 am 
Newbie

Joined: Fri Apr 16, 2010 11:29 am
Posts: 5
Hi,

In my hibernate app, all my POJOs extend a common class, DataObject, which has a save() method, which, when called, runs

Code:
session.saveOrUpdate(this);
session.flush();


Now, this works perfectly, and I can see the database query in the log, and I can see the row in the database.

When I come to load its associated parent object (Group), however, I get

Code:
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org....User#25]


This is part of an API, so the workflow is:
1. Complete web form for new user, submit
2. Hibernate creates new user
3. Website loads group (list of users)
4. Hibernate loads and returns group
5. Website displays group

The error is occurring during stage 4.

Any help would be greatly appreciated, I've been tearing my hair out for about 6 hours on this!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.