[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2265) allow property-refs to refer to portions of the owner's composite identifier

Steve Ebersole (JIRA) noreply at atlassian.com
Fri Dec 1 12:22:04 EST 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2265?page=comments#action_25533 ] 

Steve Ebersole commented on HHH-2265:
-------------------------------------

I should mention that this is a very, very, very badly designed schema...

property-ref assumes that its target is unique.  Here, that would mean that an individual column of the composite primary key is additionally unique on its own for this to work as expected

> allow property-refs to refer to portions of the owner's composite identifier
> ----------------------------------------------------------------------------
>
>          Key: HHH-2265
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2265
>      Project: Hibernate3
>         Type: Improvement

>   Components: core
>     Versions: 3.2.1
>     Reporter: Steve Ebersole
>     Assignee: Steve Ebersole
>      Fix For: 3.2.2

>
>
> Currently property-refs cannot reference portions of a composite identifier, neither embedded or mapped variations.
> For example,
> <class name="Discount">
>     <composite-id>
>         <key-property name="customerId" ... />
>         <key-property name="baseCode" column="DISCOUNT_BASE_CODE"... />
>     </composite-id>
>     <set ...>
>         <key column="CODE_BASE_CODE" property-ref="id.basecode"/>
>         <one-to-many class="Code"/>
>     </set>
> </class>
> <class name="Code">
>     <!-- some property mapped to a CODE_BASE_CODE column -->
>     ...
> </class>

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