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.  [ 6 posts ] 
Author Message
 Post subject: Random Insertions?
PostPosted: Mon Jul 25, 2005 3:34 pm 
Newbie

Joined: Thu Nov 04, 2004 1:37 pm
Posts: 10
I have been using Hibernate for some time and have finally come across something i cant explain.

I am inserting some records, and for some reason Hibernate is changing my value and inserting a random one. Examples of the values Hibernate is using are listed. I am setting the property manually with a specific integer, but this is what Hibernate gives me...

1.11E-42, 1.27E-52, 8.2E45, etc...

Strange.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 25, 2005 4:13 pm 
Regular
Regular

Joined: Thu May 26, 2005 2:08 pm
Posts: 99
Quote:
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Filling those fields out instead of deleting them would really help out if anyone is going to try solving this.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 25, 2005 5:56 pm 
Expert
Expert

Joined: Thu Dec 04, 2003 12:36 pm
Posts: 275
Location: Bielefeld, Germany
jdl is right.
What do you expect us to answer without any information provided?

Post your mappings, your POJOs, code...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 6:02 pm 
Newbie

Joined: Thu Nov 04, 2004 1:37 pm
Posts: 10
didn't expect a solution. just wondering if anyone came across something like this. if not thats cool. i'll just keep looking into it. i'm not going to sit here and publish my companies source to get a resolution. right now i just manually save the objects using sql as a stop gap. the code wouldn't help much. hibernate 2.1.8 with oracle 8i. its a standard setup like many others i have. an object has a parent. attached parent to child, and added child to parent. save parent. parent is saved ok. child is saved ok too, but the foreign key that should point to the parent is a huge random number. funny thing is that i can use normal sql to do this ok. i.e. i have a prepared statement and i set the parent object id parameter using child.getParent().getId(). this works ok.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 6:10 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Really looks like we have some nice new people here this week. Fantastic...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 6:16 pm 
Expert
Expert

Joined: Thu Dec 04, 2003 12:36 pm
Posts: 275
Location: Bielefeld, Germany
skjhibern8 wrote:
i'm not going to sit here and publish my companies source to get a resolution.


Well, there are some solutions to this.
You could rename your class names, table names, packages or whatever. Alternatively, and probably even better, you could create a little test case showing your problem.

But this way no one will be able to help you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.