-->
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.  [ 5 posts ] 
Author Message
 Post subject: Load after store
PostPosted: Mon Dec 29, 2003 2:25 pm 
Regular
Regular

Joined: Wed Sep 10, 2003 7:09 am
Posts: 63
Hi,

I am getting a problem loading objects with hibernate. I am using hibernate 2.1.1.

In my application, each interface command has its own session. The session is started at the begin and closed at the end of the commnad.

I am trying to so two commands: create and consult an object.

In the first command, when I store the object in the database, everything goes fine, and I can see the object in the database with the mysql shell.

In the second command, when I try to load the stored objects, hibernate does not find the object stored in the previous command.

Does anyone know what might be the problem?

Thanks in advance,
Joao Rangel


Top
 Profile  
 
 Post subject: Load after store
PostPosted: Mon Dec 29, 2003 2:29 pm 
Regular
Regular

Joined: Wed Sep 10, 2003 7:09 am
Posts: 63
Sorry,

I forgot to mention in the previous post, that I am using assigned keys for these objects, and when I tried to load it with a lock, it works, but if I use load without lock, it doesn't find the object.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 29, 2003 2:30 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Please show the code between your open and close session command for both cases.


Top
 Profile  
 
 Post subject: Application code
PostPosted: Mon Dec 29, 2003 3:27 pm 
Regular
Regular

Joined: Wed Sep 10, 2003 7:09 am
Posts: 63
The application code it's very abstract and it's separeted by many classes and methods. Could you be more specific in which part of the code you want me to show?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 29, 2003 3:30 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Well, we cant really say anything about your problem without knowing what you do. What are your mappings, are you using composite keys, what are you doing with your objects between open() and close() of the session.


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

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.