[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-2874) Problem with join table mapping
Gail Badner (JIRA)
noreply at atlassian.com
Wed Oct 3 13:45:25 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gail Badner closed HHH-2874.
----------------------------
Resolution: Rejected
Please use the user forum for help (http://forum.hibernate.org/).
> Problem with join table mapping
> -------------------------------
>
> Key: HHH-2874
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2874
> Project: Hibernate3
> Issue Type: Bug
> Affects Versions: 3.2.5
> Reporter: vinod dev
> Priority: Minor
>
> I have a the below problem while mapping in hibernate.
> I am mapping a many - to - many relation.
> Table A Table B
> Field X Field A
> Field Y Field Y
> Field Z Field C
> Table C(Many - to - Many or Combination Table)
> Field X
> Field Y
> Field A
> Mapping part
> <class name="Table A's class">
> <set name="tests" table="Table C" cascade = "all">
> <key >
> <column name="Field X" ></column>
> <column name="Field Y"></column>
> </key>
> <many-to-many class="Table B's Class" >
> <column name="Field A"/>
> <column name="Field Y"/>
> </many-to-many>
> </set>
> </class>
> <class name="Table B's class">
> .
> .
> .
> </class>
> Bold indicates composite primary key.
> I get Repeated column in mapping for collection.
> If I remove field Y from either many-to-many or key I get this error.
> Foreign key (FKD3FBFB2875481687: must have same number of columns as the referenced primary key
> I would like to know if there is any way we can get rid of this.
> Please let me know if detail is required.
> Thanks
--
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