NH-1452 - Add support for property-ref keys in join table

Original patch provided by Daniel Guenter <nicaog@gmail.com> applied with code cleanup and fixes