[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1829?page=all ]
Andrew Seales updated HHH-1829:
-------------------------------
Attachment: hhh-1829.patch
I've started working on a patch for this issue as
we're using a legacy database and need to do a join that doesn't use a
primary key. I have a working patch at the moment which seems to fix the
issue(at least for our uses), although I'm not sure how 'nice' it is.
When I looked through the code, I couldn't see the 'property-ref'
attribute in the <key> tag being stored anywhere so I have added it to
the KeyValue interface. This value is also stored in the
AbstractEntityPersister class, similarly to rootTableKeyColumnNames.
When the join is made, a check is performed to see if an alternative key
should be used in the join. If there is no property-ref specified then
the primary keys are used, otherwise the property-ref column is used.
Allow join on any property using property-ref
---------------------------------------------
Key: HHH-1829
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1829
Project: Hibernate3
Type: New Feature
Components: core
Versions: 3.2.0 cr1, 3.2.0.cr2
Reporter: Maarten Winkels
Attachments: hhh-1829.patch
Currently joining tables for one class (uing the <join...> tag) is only supported
for the id property. The property-ref is allowed on the <key..> tag inside the
<join..> tag, but this is ignored.
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira