[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3262) Hibernate Reference: Chapter 7 (Association Mappings)

joel winteregg (JIRA) noreply at atlassian.com
Thu May 1 19:09:33 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_30108 ] 

joel winteregg commented on HHH-3262:
-------------------------------------

As soon as I will have a bit more time, I would be happy to contribute with ERD schema...

> Hibernate Reference: Chapter 7 (Association Mappings)
> -----------------------------------------------------
>
>                 Key: HHH-3262
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3262
>             Project: Hibernate3
>          Issue Type: Improvement
>          Components: documentation
>            Reporter: joel winteregg
>
> If you just read section 7.2.3 http://www.hibernate.org/hib_docs/reference/en/html/associations.html#assoc-unidirectional-12m and the following sentence "We think it's better to use a join table for this kind of association." users may think that one-to-many mapping should better use a join table.
> After chating with Steve it appears that example 7.2.3 was directly related to section 7.2.1. The above explanation ("We think it's better to use...") make sens if you see 7.2.3 in contrast of 7.2.1 because the data model meaning of 7.2.1 is: Many person could live at the same address. If you only look at 7.2.3 without thinking of 7.2.1 data model, you could think that the data model only define: A person could have several address. If so, the one-to-many mapping is okay (as explained in "Hibernate in Action" chapter 7.2). But as I understood from my IRC chat, the data model here (7.2.3) extend the data model of 7.2.1 so it is: An address could host several person and a person could have several address which should be mapped as a many-to-many...
> ERD would help a lot when reading these examples, or as said Steve: "probably those two example should use the same tables, and then show mapping each side unidirectionally. That would probably make the most sense"

-- 
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