-->
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: Tutorial error Chapter 1 page 14
PostPosted: Wed Dec 14, 2005 12:22 pm 
Newbie

Joined: Wed Dec 14, 2005 8:55 am
Posts: 1
Hibernate version: 3.1

Mapping documents: Tutorial Section 1.3.4

Name and version of the database you are using: HSQLDB server 1.8.0

Hi

I am busy investigating the use of Hibernate in my project.
So far it looks promising.

In the tutorial the following statement is made:
Quote:
You can see that the primary key of the collection table is in fact a composite key, using both columns. This
also implies that there can't be duplicate email addresses per person, which is exactly the semantics we need for
a set in Java.


When checking out the DB for the generated tables, I found that I was able to add duplicate entries. This is due to the fact that the
Code:
PERSON_EMAIL_ADDR
table has no primary key set. This means the above mentioned statement is false.

I guess there is a bug in generating the collection table.

Thanks
Kobus


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.