[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4562) Some kind of typo in chapter 7.3.1
Sorin Postelnicu (JIRA)
noreply at atlassian.com
Wed Nov 11 09:05:12 EST 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34525#action_34525 ]
Sorin Postelnicu commented on HHH-4562:
---------------------------------------
It seems that I also did a mistake in the suggested correction :)
The line should read:
create table PersonAddress ( personId bigint not null, addressId bigint not null primary key )
The primary key on addressId needs to be there, because the example assumes a one-to-many association in which one address can be associated to only one person (not a very good example I'd say)
> Some kind of typo in chapter 7.3.1
> ----------------------------------
>
> Key: HHH-4562
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4562
> Project: Hibernate Core
> Issue Type: Bug
> Components: documentation
> Affects Versions: 3.3.2
> Reporter: Sorin Postelnicu
> Priority: Trivial
>
> In the example shown in chapter 7.3.1 here:
> http://docs.jboss.org/hibernate/core/3.3/reference/en/html/associations.html
> The following line seems incorrect:
> create table PersonAddress ( personId not null, addressId bigint not null primary key )
> Shouldn't it have been as follows?
> create table PersonAddress ( personId bigint not null, addressId bigint not null )
> Even such simple things can be confusing for people who are just learning to develop database applications with hibernate. They usually assume that the manual is "bug-free" and can be followed word-to-word, as a definitive reference documentation.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list