-->
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.  [ 2 posts ] 
Author Message
 Post subject: issue running the sample testing code
PostPosted: Thu Jun 22, 2006 5:08 pm 
Newbie

Joined: Thu Jun 22, 2006 4:02 pm
Posts: 1
Hi,
I am running the sample testing code and getting the following issues:
(1) In the TestCaseWithData.java there are two objects with type of BillingDetails created. One with Owner Name to be "Christian Bauer" and another with Owner Name to be"Christian Bauer". There is one extra space between those two owner names in order to distinguish them as different string. In fact if changing those two owner names to be the same, the generated database record in billing_details table will have only one row. The problem is that the OWNER_NAME column is not a unique key. Theoretically it should allow having same name of different rows in this table.
(2) One step further, utilizing existing mapping, I created a simple testing code to retrieve the BillingDetails from User utilizing the method user.getBillingDetails(). What I realized is that Hibernate actually try to differentiate each retrieved row by comparing values of every column except primary key column. This will result partial records being retrieved when doing retrieving by foreign key. In this case I couldn’t retrieve all rows with same USER_ID in billing _details table, as long as the columns have same value except primary key.

What I missed here? Please help. Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 22, 2006 6:36 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
If you are talking about the alpha releases of CaveatEmptor, you are on your own. There is no guarantee whatsoever that this code runs, or is correct.


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