code: function(left, right) {
      var ref = findReference(left, right);
      if (!ref) {
        ref = findReference(right, left);
      }
      return left.join(right).on(ref.left.equals(ref.right));
    }
docs: auto-join two tables based on column properties requires one column to have { references: {table: 'foreignTableName', column: 'foreignColumnName'}} or to have { references: 'foreignTableName'} -- in which case the foreign table's primary key is assumed