From: Peter M. (JIRA) <no...@at...> - 2006-06-02 18:19:27
|
Many-To-Many relationship with attributes on relationship --------------------------------------------------------- Key: ANN-360 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-360 Project: Hibernate Annotations Type: Bug Components: binder Versions: 3.2.0.cr1 Environment: Hibernate 3.2.0cr2, HibernateAnnotations 3.2.0cr1, HQL Reporter: Peter Muir Priority: Critical Use a composite foreign key on an entity (A) to model an many to many entity(B)-entity(C) relationship with attributes on the relationship. This is supported using hibernate mapping files. See http://forum.hibernate.org/viewtopic.php?t=958753 for more discussion. -- 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 |
From: Peter M. (JIRA) <no...@at...> - 2006-06-02 18:22:20
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-360?page=all ] Peter Muir updated ANN-360: --------------------------- Attachment: manytomanywithattributes.zip Attached is a runnable test. It supports mapping via hibernate mapping file (for which the tests pass) and via annotations (for which the tests fail). The correct semantics may not have been used for the annotation version (the annotations don't accept my mappedBy attribute) but the semantics (for the annotation version) have been kept as close as possible to those used for the hibernate mapping. If the hibernate mapping file can be mapped in HibernateAnnotations (3.2.0cr1) using different semantics then I apologise, this is not a bug! > Many-To-Many relationship with attributes on relationship > --------------------------------------------------------- > > Key: ANN-360 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-360 > Project: Hibernate Annotations > Type: Bug > Components: binder > Versions: 3.2.0.cr1 > Environment: Hibernate 3.2.0cr2, HibernateAnnotations 3.2.0cr1, HQL > Reporter: Peter Muir > Priority: Critical > Attachments: manytomanywithattributes.zip > > > Use a composite foreign key on an entity (A) to model an many to many entity(B)-entity(C) relationship with attributes on the relationship. > This is supported using hibernate mapping files. > See http://forum.hibernate.org/viewtopic.php?t=958753 for more discussion. -- 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 |
From: Peter M. (JIRA) <no...@at...> - 2006-06-02 18:31:18
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-360?page=comments#action_23255 ] Peter Muir commented on ANN-360: -------------------------------- Also, I haved tested this with mappedBy="id.productId" as well as plain mappedBy="productId". Neither work. > Many-To-Many relationship with attributes on relationship > --------------------------------------------------------- > > Key: ANN-360 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-360 > Project: Hibernate Annotations > Type: Bug > Components: binder > Versions: 3.2.0.cr1 > Environment: Hibernate 3.2.0cr2, HibernateAnnotations 3.2.0cr1, HQL > Reporter: Peter Muir > Priority: Critical > Attachments: manytomanywithattributes.zip > > > Use a composite foreign key on an entity (A) to model an many to many entity(B)-entity(C) relationship with attributes on the relationship. > This is supported using hibernate mapping files. > See http://forum.hibernate.org/viewtopic.php?t=958753 for more discussion. -- 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 |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-28 09:44:18
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-360?page=all ] Emmanuel Bernard resolved ANN-360: ---------------------------------- Resolution: Rejected This is actually a misuse of mappedBy should be @OneToMany(mappedBy="chargeType") private List<Charge> charges; @OneToMany(mappedBy="product") private List<Charge> charges; > Many-To-Many relationship with attributes on relationship > --------------------------------------------------------- > > Key: ANN-360 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-360 > Project: Hibernate Annotations > Type: Bug > Components: binder > Versions: 3.2.0.cr1 > Environment: Hibernate 3.2.0cr2, HibernateAnnotations 3.2.0cr1, HQL > Reporter: Peter Muir > Priority: Critical > Attachments: manytomanywithattributes.zip > > > Use a composite foreign key on an entity (A) to model an many to many entity(B)-entity(C) relationship with attributes on the relationship. > This is supported using hibernate mapping files. > See http://forum.hibernate.org/viewtopic.php?t=958753 for more discussion. -- 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 |