[hibernate-dev] Property-Ref Bug

Andrew Seales andrew.seales at ed.ac.uk
Wed Nov 22 10:02:46 EST 2006


Hi,

I've started working on
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1829 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.

Also, is it normal to get 6 failures and 7 errors when running 'ant
junitreport' (from trunk revision 10864)?

Attached is an svn diff of the changes I have made.

Thanks,
-- 
Andrew Seales

EDINA                   tel: +44 (0) 131 651 1430
Edinburgh University    fax: +44 (0) 131 650 3308
Main Library Building   url: http://edina.ac.uk
George Square           email: andrew.seales at ed.ac.uk
Edinburgh EH8 9LJ
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hhh-1829.patch
Type: text/x-patch
Size: 4453 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/hibernate-dev/attachments/20061122/22f1dfd4/attachment.bin 


More information about the hibernate-dev mailing list