[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1797) <set> inside of a <join>
Nicolas De Cubber (JIRA)
noreply at atlassian.com
Fri Oct 19 07:51:38 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_28483 ]
Nicolas De Cubber commented on HHH-1797:
----------------------------------------
The solution is to move the <set> outside the <join>, like this :
<subclass name="LicensePlateSuspend" discriminator-value="license plate suspend">
<set name="licensePlates">
<key>
<column name="licensePlateSuspendId"/>
<column name="licensePlate"/>
</key>
<one-to-many class="LicensePlate"/>
</set>
<join table="LicensePlateSuspend">
<key column="licensePlateSuspendId"/>
</join>
</subclass>
> <set> inside of a <join>
> ------------------------
>
> Key: HHH-1797
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1797
> Project: Hibernate3
> Issue Type: Improvement
> Components: core, metamodel
> Environment: n/a
> Reporter: Michael Masters
>
> I want to be able to use the following mapping. The problem I face is that a <set> cannot exist in a <join>.
> <?xml version="1.0"?>
> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <hibernate-mapping package="com.digitaldarwin.hibernate.model">
> <class name="Event" table="Event">
> <id name="id" column="eventId">
> <generator class="native">
> <param name="sequence">event_eventid_seq</param>
> </generator>
> </id>
> <discriminator column="eventType" type="string"/>
> <subclass name="Enforcement" discriminator-value="enforcement">
> <join table="Enforcement">
> <key column="eventId"/>
> <property name="name" column="name"/>
> </join>
> </subclass>
> <subclass name="LicensePlateSuspend" discriminator-value="license plate suspend">
> <join table="LicensePlateSuspend">
> <key column="licensePlateSuspendId"/>
> <set name="licensePlates">
> <key>
> <column name="licensePlateSuspendId"/>
> <column name="licensePlate"/>
> </key>
> <one-to-many class="LicensePlate"/>
> </set>
> </join>
> </subclass>
> </class>
> </hibernate-mapping>
--
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