I've started working on
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.
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(a)ed.ac.uk
Edinburgh EH8 9LJ